Query Rules

List of methods

Save a single rule

Create or update a single rule.

Batch save multiple rules

Create or update a specified set of rules, or all rules.

Get a rule

Get the object/definition of a specific rule.

Delete a single rule

Delete a specific rule using its id.

Clear all rules

Delete all rules in an index.

Search for rules

Search for rules matching various criteria.

Export rules

Retrieve an index’s full list of rules using an iterator.

Overview

Query Rules allows performing pre- and post-processing on queries matching specific patterns. For more details, please refer to our Rules guide.

Miscellaneous

As its name implies, Query Rules is applied at query time. Therefore, some search parameters can be used to control how the rules are applied.

Most of the methods manipulate queryRule objects, as described in detail in the different Query Rules methods.

Just like for objects or synonyms, write methods for rules are asynchronous: they return a taskID that can be used by Wait for operations.