mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-03-08 18:19:21 +00:00
* Refactor term query documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Refactor term-level query documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * fix links Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More examples Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Chris Moore <107723039+cwillum@users.noreply.github.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Add section about expensive queries Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * More editorial feedback 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: Chris Moore <107723039+cwillum@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
2.2 KiB
2.2 KiB
layout | title | has_children | nav_order |
---|---|---|---|
default | Term-level queries | true | 20 |
Term-level queries
Term-level queries search an index for documents that contain an exact search term. Documents returned by a term-level query are not sorted by their relevance scores.
When working with text data, use term-level queries for fields mapped as keyword
only.
Term-level queries are not suited for searching analyzed text fields. To return analyzed fields, use a full-text query.
Term-level query types
The following table lists all term-level query types.
Query type | Description |
---|---|
term |
Searches for documents containing an exact term in a specific field. |
terms |
Searches for documents containing one or more terms in a specific field. |
terms_set |
Searches for documents that match a minimum number of terms in a specific field. |
ids |
Searches for documents by document ID. |
range |
Searches for documents with field values in a specific range. |
prefix |
Searches for documents containing terms that begin with a specific prefix. |
exists |
Searches for documents with any indexed value in a specific field. |
fuzzy |
Searches for documents containing terms that are similar to the search term within the maximum allowed Levenshtein distance. The Levenshtein distance measures the number of one-character changes needed to change one term to another term. |
wildcard |
Searches for documents containing terms that match a wildcard pattern. |
regexp |
Searches for documents containing terms that match a regular expression. |