The ruleContexts
parameter is created by the Magento extension whenever a user selects "Yes" in the Create Query rule? dropdown for a facet in the Magento admin:
As shown in the infographic in this section of the Magento admin, the created query rule will 'automatically filter on a facet when a user searches for its value in a query. For example, when you create a Query rule for a "color" facet and a user is searching "red shorts", Algolia will internally filter results for the color "red" and search only "shorts". It leads to more relevant results. This query rule is applied for both Autocomplete and InstantSearch results.'