Why isn't Query Rules using facets not supported?

In Query Rules using Facets it is already said that Query Rules only hooks in on the search query and not on facets.
Why isn’t it supported and will this be supported in the future?

It seems to be a common use case to have some rules based on the applied facets.

Hi @cheeming_li

I am wondering what you are trying to achieve by saying “query rule on facet”

For example, one way you could leverage any text in the URL is using ruleContexts - for example:

  • visit www.myshop.com/categories/dresses
  • your frontend code takes dresses from the URL
  • your frontend code sends an extra search parameter ruleContexts: ['dresses'] to Algolia
  • triggers a Rule you’ve created with a consequence for this context

This is described here.

We may or may not be able to satisfy it, however it would be good to hear - what is your goal, what behavior are you trying to achieve?

Thank you

Hi @ajay.david,

Your example is indeed what I am trying to achieve:
Show promo banners based on the filtered items/facets e.g. on category or brand

With the ruleContexts I probably will be able to achieve what I want.

As facets are part of searching I thought it would be integrated in Algolia and no coding would be required.

2 Likes

Thank you @cheeming_li, I’ll make sure to forward your feedback to the product team :smile:

Happy coding!

1 Like