mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
* Add docs for rule query * Add test * Fix formatting in rule query dsl * Remove query string as required from rule query docs * PR feedback * Update with API changes * Expand and clarify 'search using query rules' doc * Clean up wording * Update put syntax * Fix examples after refactor * Update docs/reference/query-dsl/rule-query.asciidoc Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co> * PR feedback + update privilege * PR feedback * More PR feedback * Small correction --------- Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
30 lines
953 B
Text
30 lines
953 B
Text
[[query-rules-apis]]
|
|
== Query rules APIs
|
|
|
|
preview::[]
|
|
|
|
++++
|
|
<titleabbrev>Query rules APIs</titleabbrev>
|
|
++++
|
|
|
|
---
|
|
|
|
<<search-using-query-rules,Query rules>> allow you to configure per-query rules that are applied at query time to queries that match the specific rule.
|
|
Query rules are organized into _rulesets_, collections of query rules that are matched against incoming queries.
|
|
Query rules are applied using the <<query-dsl-rule-query, rule query>>.
|
|
|
|
If a query matches one or more rules in the ruleset, the query is re-written to apply the rules before searching.
|
|
This allows pinning documents for only queries that match a specific term.
|
|
|
|
Use the following APIs to manage query rulesets:
|
|
|
|
* <<put-query-ruleset>>
|
|
* <<get-query-ruleset>>
|
|
* <<list-query-rulesets>>
|
|
* <<delete-query-ruleset>>
|
|
|
|
include::put-query-ruleset.asciidoc[]
|
|
include::get-query-ruleset.asciidoc[]
|
|
include::list-query-rulesets.asciidoc[]
|
|
include::delete-query-ruleset.asciidoc[]
|
|
|