Query String Usageedit

Fluent DSL exampleedit

q
.QueryString(c => c
    .Name("named_query")
    .Boost(1.1)
    .Fields(f => f.Field(p=>p.Description).Field("myOtherField"))
    .Query("hello world")
    .DefaultField(p=>p.Description)
    .DefaultOperator(Operator.Or)
    .Analyzer("standard")
    .QuoteAnalyzer("quote-an")
    .AllowLeadingWildcard()
    .MaximumDeterminizedStates(2)
    .Escape()
    .FuzzyPrefixLength(2)
    .FuzzyMaxExpansions(3)
    .FuzzyRewrite(MultiTermQueryRewrite.ConstantScore)
    .Rewrite(MultiTermQueryRewrite.ConstantScore)
    .Fuzziness(Fuzziness.Auto)
    .TieBreaker(1.2)
    .AnalyzeWildcard()
    .MinimumShouldMatch(2)
    .QuoteFieldSuffix("'")
    .Lenient()
)

Object Initializer syntax exampleedit

new QueryStringQuery
{
    Fields = Field<Project>(p=>p.Description).And("myOtherField"),
    Boost = 1.1,
    Name = "named_query",
    Query = "hello world",
    DefaultField = Field<Project>(p=>p.Description),
    DefaultOperator = Operator.Or,
    Analyzer = "standard",
    QuoteAnalyzer = "quote-an",
    AllowLeadingWildcard = true,
    MaximumDeterminizedStates = 2,
    Escape = true,
    FuzzyPrefixLength = 2,
    FuzzyMaxExpansions = 3,
    FuzzyRewrite = MultiTermQueryRewrite.ConstantScore,
    Rewrite = MultiTermQueryRewrite.ConstantScore,
    Fuzziness = Fuzziness.Auto,
    TieBreaker = 1.2,
    AnalyzeWildcard = true,
    MinimumShouldMatch = 2,
    QuoteFieldSuffix = "'",
    Lenient = true
}

Example json output. 

{
  "query_string": {
    "_name": "named_query",
    "boost": 1.1,
    "query": "hello world",
    "default_field": "description",
    "default_operator": "or",
    "analyzer": "standard",
    "quote_analyzer": "quote-an",
    "allow_leading_wildcard": true,
    "fuzzy_max_expansions": 3,
    "fuzziness": "AUTO",
    "fuzzy_prefix_length": 2,
    "analyze_wildcard": true,
    "max_determinized_states": 2,
    "minimum_should_match": 2,
    "lenient": true,
    "fields": [
      "description",
      "myOtherField"
    ],
    "tie_breaker": 1.2,
    "rewrite": "constant_score",
    "fuzzy_rewrite": "constant_score",
    "quote_field_suffix": "'",
    "escape": true
  }
}