Compound queries wrap other compound or leaf queries, either to combine their results and scores, to change their behaviour, or to switch from query to filter context.
The queries in this group are:
constant_score
query
_score
.
bool
query
must
, should
, must_not
, or filter
clauses. The must
and should
clauses have their scores combined — the more matching clauses, the better — while the must_not
and filter
clauses are executed in filter context.
dis_max
query
bool
query combines the scores from all
matching queries, the dis_max
query uses the score of the single best-
matching query clause.
function_score
query
boosting
query
positive
query, but reduce the score of
documents which also match a negative
query.