OpenSearch/docs/reference/query-dsl/special-queries.asciidoc
markharwood 7d5ab17bb2
Search enhancement: pinned queries () ()
* Search enhancement: pinned queries ()

Search enhancement: - new query type allows selected documents to be promoted above any "organic” search results.
This is the first feature in a new module `search-business-rules` which will house licensed (non OSS) logic for rewriting queries according to business rules.
The PinnedQueryBuilder class offers a new `pinned` query in the DSL that takes an array of promoted IDs and an “organic” query and ensures the documents with the promoted IDs rank higher than the organic matches.

Closes 
2019-08-20 11:38:22 +01:00

51 lines
1.6 KiB
Plaintext

[[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-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.
include::distance-feature-query.asciidoc[]
include::mlt-query.asciidoc[]
include::percolate-query.asciidoc[]
include::rank-feature-query.asciidoc[]
include::script-query.asciidoc[]
include::script-score-query.asciidoc[]
include::wrapper-query.asciidoc[]
include::pinned-query.asciidoc[]