elasticsearch/docs/reference/query-languages/query-dsl/compound-queries.md
Craig Taverner 94cad286bc
Restructure query-languages docs files for clarity (#124797)
In a few previous PR's we restructured the ES|QL docs to make it possible to generate them dynamically.

This PR just moves a few files around to make the query languages docs easier to work with, and a little more organized like the ES|QL docs.

A bit part of this was setting up redirects to the new locations, so other repo's could correctly link to the elasticsearch docs.
2025-03-17 17:58:58 +01:00

31 lines
1.8 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/compound-queries.html
---
# Compound queries [compound-queries]
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:
[`bool` query](/reference/query-languages/query-dsl/query-dsl-bool-query.md)
: The default query for combining multiple leaf or compound query clauses, as `must`, `should`, `must_not`, or `filter` clauses. The `must` and `should` clauses have their scores combinedthe more matching clauses, the betterwhile the `must_not` and `filter` clauses are executed in filter context.
[`boosting` query](/reference/query-languages/query-dsl/query-dsl-boosting-query.md)
: Return documents which match a `positive` query, but reduce the score of documents which also match a `negative` query.
[`constant_score` query](/reference/query-languages/query-dsl/query-dsl-constant-score-query.md)
: A query which wraps another query, but executes it in filter context. All matching documents are given the same constant `_score`.
[`dis_max` query](/reference/query-languages/query-dsl/query-dsl-dis-max-query.md)
: A query which accepts multiple queries, and returns any documents which match any of the query clauses. While the `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](/reference/query-languages/query-dsl/query-dsl-function-score-query.md)
: 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.