Match Bool Prefix Usage

edit

Fluent DSL example

edit
q
.MatchBoolPrefix(c => c
    .Field(p => p.Description)
    .Analyzer("standard")
    .Boost(1.1)
    .Query("lorem ips")
    .Fuzziness(Fuzziness.AutoLength(3, 6))
    .FuzzyTranspositions()
    .FuzzyRewrite(MultiTermQueryRewrite.TopTermsBlendedFreqs(10))
    .Name("named_query")
)

Object Initializer syntax example

edit
new MatchBoolPrefixQuery
{
    Field = Field<Project>(p => p.Description),
    Analyzer = "standard",
    Boost = 1.1,
    Name = "named_query",
    Query = "lorem ips",
    Fuzziness = Fuzziness.AutoLength(3, 6),
    FuzzyTranspositions = true,
    FuzzyRewrite = MultiTermQueryRewrite.TopTermsBlendedFreqs(10),
}

Example json output.

{
  "match_bool_prefix": {
    "description": {
      "_name": "named_query",
      "boost": 1.1,
      "query": "lorem ips",
      "analyzer": "standard",
      "fuzzy_rewrite": "top_terms_blended_freqs_10",
      "fuzziness": "AUTO:3,6",
      "fuzzy_transpositions": true
    }
  }
}