[[query-rules-apis]] == Query rules APIs ++++ Query rules APIs ++++ --- <> 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 <>. 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: * <> * <> * <> * <> * <> * <> * <> include::put-query-ruleset.asciidoc[] include::get-query-ruleset.asciidoc[] include::list-query-rulesets.asciidoc[] include::delete-query-ruleset.asciidoc[] include::put-query-rule.asciidoc[] include::get-query-rule.asciidoc[] include::delete-query-rule.asciidoc[]