You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Terms List Query Usageedit
Fluent DSL Exampleedit
q .Terms(c => c .Name("named_query") .Boost(1.1) .Field(p => p.Description) .DisableCoord() .MinimumShouldMatch(MinimumShouldMatch.Fixed(2)) .Terms(new List<string> { "term1", "term2" }) )
Object Initializer Syntax Exampleedit
new TermsQuery { Name = "named_query", Boost = 1.1, Field = "description", Terms = new List<string> { "term1", "term2" }, DisableCoord = true, MinimumShouldMatch = 2 }
Example json output.
{ "terms": { "_name": "named_query", "boost": 1.1, "description": [ "term1", "term2" ], "disable_coord": true, "minimum_should_match": 2 } }
Fluent DSL Exampleedit
q .Terms(c => c .Name("named_query") .Boost(1.1) .Field(p => p.Description) .DisableCoord() .Terms(_terms) )
Object Initializer Syntax Exampleedit
new TermsQuery { Name = "named_query", Boost = 1.1, Field = "description", Terms = _terms, DisableCoord = true, }
Example json output.
{ "terms": { "_name": "named_query", "boost": 1.1, "description": [ [ "term1", "term2" ] ], "disable_coord": true } }
Fluent DSL Exampleedit
q .Terms(c => c .Name("named_query") .Boost(1.1) .Field(p => p.NumberOfCommits) .DisableCoord() .Terms(_terms) )
Object Initializer Syntax Exampleedit
new TermsQuery { Name = "named_query", Boost = 1.1, Field = "numberOfCommits", Terms = _terms, DisableCoord = true, }
Example json output.
{ "terms": { "_name": "named_query", "boost": 1.1, "numberOfCommits": [ [ "term1", "term2" ] ], "disable_coord": true } }