Add disjunctive tag refinement in Algolia JS Helper

I’m trying to do a disjunctive filter by tags in Algolia but there’s no documentation about it. This is what i’m doing actually:

helper.addTag('Shangai').search();

That will filter all the documents that have the Shangai tag. But i need to get also all the documents that have the Brooklyn tag.

helper.addTag('Brooklyn').search();

After doing that i get 0 results because algolia is using the AND operator as default to search in tags, so is looking for documents that have Shangai AND Brooklyn. What i need Shangai OR Brooklyn.

Anyone knows how to do it?

Hi @mdaguerre maybe you could use disjunctive faceting for that? https://community.algolia.com/algoliasearch-helper-js/examples.html#disjunctive-facet-list

Alternatively, if what you want to achieve is just filtering (and not actually displaying the ORed tags), you can go for the generic “filters” parameter:

helper.setQueryParameter('filters', '_tags:Shangai OR _tags:Brooklyn');

Let me know how it goes.