Js helper - possible to combine conjunctive and disjunctive faceting on the same attribute?

Using the AlgoliaSearchHelper - is it possible to add both conjunctive and disjunctive filters on the same facet attribute? I can seem only to make one or the other work at a time but not both.

I’m hoping to be able to combine them to allow queries that are like “foo AND (bar OR baz) AND NOT buzz” all on the same attribute. Is this possible?

Hi @jake, your best option here might be to directly use the “filter” parameter where you will be able to write complex boolean operations: https://www.algolia.com/doc/api-client/php/parameters/filters/#filters

Then using helper.setQueryParameter you could go very advanced: https://community.algolia.com/algoliasearch-helper-js/reference.html#AlgoliaSearchHelper#setQueryParameter

Let me know if that works.

1 Like