Specialized queries
OpenSearch supports the following specialized queries:
-
agentic: Uses natural language questions that are automatically planned and executed by an agent with a large language model. -
distance_feature: Calculates document scores based on the dynamically calculated distance between the origin and a document’sdate,date_nanos, orgeo_pointfields. This query can skip non-competitive hits. -
knn: Used for searching raw vectors during vector search. -
more_like_this: Finds documents similar to the provided text, document, or collection of documents. -
neural: Used for searching by text or image in vector search. -
neural_sparse: Used for vector field search in sparse neural search. -
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. -
template: Allows you to use Mustache templating in queries. -
wrapper: Accepts other queries as JSON or YAML strings.