Debugging 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.
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 ifenableRules
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.