Link Search Menu Expand Document Documentation Menu

You're viewing version 2.11 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

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.
350 characters left

Have a question? .

Want to contribute? or .