You're viewing version 3.7 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.
Specialized queries
Specialized queries provide advanced scoring, filtering, and utility functions beyond standard full-text and term queries.
For AI and vector search queries (k-NN, Neural, Neural sparse, Agentic, Template), see AI and vector search queries.
| Query type | Description |
|---|---|
distance_feature | Calculates document scores based on the dynamically calculated distance between the origin and a document’s date, date_nanos, or geo_point fields. This query can skip non-competitive hits. |
more_like_this | Finds documents similar to the provided text, document, or collection of documents. |
percolate | Finds queries (stored as documents) that match the provided document. |
rank_feature | Calculates scores based on the values of numeric features. This query can skip non-competitive hits. |
script | Uses a script as a filter. |
script_score | Calculates a custom score for matching documents using a script. |
wrapper | Accepts other queries as JSON or YAML strings. |