Debugging Query Rules
When you have a large set of rules, it may be difficult to understand which rules were applied on a given query, and why. Fortunately, Algolia provides a few tools to help you debug rule application.
getRankingInfo parameter triggers additional information pertaining to the rules:
- Promoted hits are labelled with a
"promoted": truefield inside the
_rankingInfoobject. This field is omitted from regular hits.
- The list of applied rules is available inside the
appliedRulestop-level field. This field is omitted when no rule has been applied (even if
In addition, the
params response field contains search parameters after rule application, and as such reflects the side-effects of the rules.
Tip: When in doubt, you can always run the same query with
enableRules=false and compare the results you get with and without rules.