WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Match Usageedit
Fluent DSL exampleedit
q .Match(c => c .Field(p => p.Description) .Analyzer("standard") .Boost(1.1) .CutoffFrequency(0.001) .Query("hello world") .Fuzziness(Fuzziness.Auto) .Lenient() .FuzzyTranspositions() .MaxExpansions(2) .MinimumShouldMatch(2) .PrefixLength(2) .Operator(Operator.Or) .FuzzyRewrite(MultiTermQueryRewrite.TopTermsBlendedFreqs(10)) .Slop(2) .Name("named_query") )
Object Initializer syntax exampleedit
new MatchQuery { Field = Field<Project>(p => p.Description), Analyzer = "standard", Boost = 1.1, Name = "named_query", CutoffFrequency = 0.001, Query = "hello world", Fuzziness = Fuzziness.Auto, FuzzyTranspositions = true, MinimumShouldMatch = 2, FuzzyMultiTermQueryRewrite = MultiTermQueryRewrite.TopTermsBlendedFreqs(10), MaxExpansions = 2, Slop = 2, Lenient = true, Operator = Operator.Or, PrefixLength = 2 }
Example json output.
{ "match": { "description": { "_name": "named_query", "boost": 1.1, "query": "hello world", "analyzer": "standard", "fuzzy_rewrite": "top_terms_blended_freqs_10", "fuzziness": "AUTO", "fuzzy_transpositions": true, "cutoff_frequency": 0.001, "prefix_length": 2, "max_expansions": 2, "slop": 2, "lenient": true, "minimum_should_match": 2, "operator": "or" } } }