mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-03-01 14:09:09 +00:00
* Refactor full-text query documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add examples and parameter descriptions Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add multi-match query Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add query string field format Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Query string examples Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add regular expressions and fuzziness Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add wildcard and regex warning Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added more query string format Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added multi-field sections Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Rewrite minimum should match section Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added allow expensive queries section Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add simple query string query Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Small rewrites Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add intervals query Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Include discover in query string syntax Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Link and index page fix Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Implemented editorial comments Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com>
26 lines
1.8 KiB
Markdown
26 lines
1.8 KiB
Markdown
---
|
|
layout: default
|
|
title: Compound queries
|
|
has_children: true
|
|
has_toc: false
|
|
nav_order: 40
|
|
redirect_from:
|
|
- /query-dsl/compound/index/
|
|
- /query-dsl/query-dsl/compound/
|
|
---
|
|
|
|
# Compound queries
|
|
|
|
Compound queries serve as wrappers for multiple leaf or compound clauses either to combine their results or to modify their behavior.
|
|
|
|
The following table lists all compound query types.
|
|
|
|
Query type | Description
|
|
:--- | :---
|
|
[`bool`]({{site.url}}{{site.baseurl}}/query-dsl/compound/bool/) (Boolean)| Combines multiple query clauses with Boolean logic.
|
|
[`boosting`]({{site.url}}{{site.baseurl}}/query-dsl/compound/boosting/) | Changes the relevance score of documents without removing them from the search results. Returns documents that match a `positive` query, but downgrades the relevance of documents in the results that match a `negative` query.
|
|
[`constant_score`]({{site.url}}{{site.baseurl}}/query-dsl/compound/constant-score/) | Wraps a query or a filter and assigns a constant score to all matching documents. This score is equal to the `boost` value.
|
|
[`dis_max`]({{site.url}}{{site.baseurl}}/query-dsl/compound/disjunction-max/) (disjunction max) | Returns documents that match one or more query clauses. If a document matches multiple query clauses, it is assigned a higher relevance score. The relevance score is calculated using the highest score from any matching clause and, optionally, the scores from the other matching clauses multiplied by the tiebreaker value.
|
|
[`function_score`]({{site.url}}{{site.baseurl}}/query-dsl/compound/function-score/) | Recalculates the relevance score of documents that are returned by a query using a function that you define.
|
|
[`hybrid`]({{site.url}}{{site.baseurl}}/query-dsl/compound/hybrid/) | Combines relevance scores from multiple queries into one score for a given document.
|