NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Dismax Query Usage
editDismax Query Usage
editFluent DSL example
editq .DisMax(c => c .Name("named_query") .Boost(1.1) .TieBreaker(1.11) .Queries( qq => qq.MatchAll(m => m.Name("query1")), qq => qq.MatchAll(m => m.Name("query2")) ) )
Object Initializer syntax example
editnew DisMaxQuery() { Name = "named_query", Boost = 1.1, TieBreaker = 1.11, Queries = new QueryContainer[] { new MatchAllQuery() { Name = "query1" }, new MatchAllQuery() { Name = "query2" }, } }
Example json output.
{ "dis_max": { "_name": "named_query", "boost": 1.1, "queries": [ { "match_all": { "_name": "query1" } }, { "match_all": { "_name": "query2" } } ], "tie_breaker": 1.11 } }