[[specialized-queries]]

== Specialized queries

This group contains queries which do not fit into the other groups:

<<query-dsl-distance-feature-query,`distance_feature` query>>::
A query that computes scores based on the dynamically computed distances
between the origin and documents' `date`, `date_nanos`, and `geo_point` fields.
It is able to efficiently skip non-competitive hits.

<<query-dsl-mlt-query,`more_like_this` query>>::
This query finds documents which are similar to the specified text, document,
or collection of documents.

<<query-dsl-percolate-query,`percolate` query>>::
This query finds queries that are stored as documents that match with
the specified document.

<<query-dsl-knn-query,`knn` query>>::
A query that finds the _k_ nearest vectors to a query
vector, as measured by a similarity metric.

<<query-dsl-rank-feature-query,`rank_feature` query>>::
A query that computes scores based on the values of numeric features and is
able to efficiently skip non-competitive hits.

<<query-dsl-script-query,`script` query>>::
This query allows a script to act as a filter. Also see the
<<query-dsl-function-score-query,`function_score` query>>.

<<query-dsl-script-score-query,`script_score` query>>::
A query that allows to modify the score of a sub-query with a script.

<<query-dsl-wrapper-query,`wrapper` query>>::
A query that accepts other queries as json or yaml string.

<<query-dsl-pinned-query,`pinned` query>>::
A query that promotes selected documents over others matching a given query.

<<query-dsl-rule-query,`rule` query>>::
A query that supports applying query-based contextual rules, defined using the <<query-rules-apis,Query Rules API>>, to a given query.

include::distance-feature-query.asciidoc[]

include::mlt-query.asciidoc[]

include::percolate-query.asciidoc[]

include::knn-query.asciidoc[]

include::rank-feature-query.asciidoc[]

include::script-query.asciidoc[]

include::script-score-query.asciidoc[]

include::wrapper-query.asciidoc[]

include::pinned-query.asciidoc[]

include::rule-query.asciidoc[]

include::weighted-tokens-query.asciidoc[]
