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.

The usual getRankingInfo parameter triggers additional information pertaining to the rules:

  • Promoted hits are labelled with a "promoted": true field inside the _rankingInfo object. This field is omitted from regular hits.
  • The list of applied rules is available inside the appliedRules top-level field. This field is omitted when no rule has been applied (even if enableRules is true).

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.

Did you find this page helpful?