NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Boosting Query
editBoosting Query
editThe boosting
query can be used to effectively demote results that
match a given query. Unlike the "NOT" clause in bool query, this still
selects documents that contain undesirable terms, but reduces their
overall score.
GET /_search { "query": { "boosting" : { "positive" : { "term" : { "field1" : "value1" } }, "negative" : { "term" : { "field2" : "value2" } }, "negative_boost" : 0.2 } } }