WARNING: Version 6.0 of Elasticsearch 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.
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:
A query which wraps another query, but executes it in filter context. All
matching documents are given the same “constant”
The default query for combining multiple leaf or compound query clauses, as
shouldclauses have their scores combined — the more matching clauses, the better — while the
filterclauses are executed in filter context.
A query which accepts multiple queries, and returns any documents which match
any of the query clauses. While the
boolquery combines the scores from all matching queries, the
dis_maxquery uses the score of the single best- matching query clause.
- Modify the scores returned by the main query with functions to take into account factors like popularity, recency, distance, or custom algorithms implemented with scripting.
Return documents which match a
positivequery, but reduce the score of documents which also match a