Query Rules using Facets

My use case:

  • I am using algolia for category display pages and for search pages.
  • When I navigate to a category I want to merchandise on that category.
  • I want to have a query rule that runs on that category.
    • When {facet:category_id=2} promote the following results [ {}, {} ] etc.

Now when I navigate to a category I perform:


In this scenario I would have a query rule for each of my categories that performs merchandising by matching the current category_id to the curent facetFilters=category_ids

Is it possible to do this with query rules? - or as the name suggests - can you only match the rule on the query, and not the params?

Hi @SimonReilly - Indeed, you are correct regarding Query Rules. It really only hooks into the “query”.

1 Like