I would like to use optionalFilters https://www.algolia.com/doc/api-reference/api-parameters/optionalFilters/?language=javascript for which I need to set attributesForFaceting but there's no documentation on how to do this. https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/
<ais-configure
:hitsPerPage="8"
v-bind="searchParameters"
attributesForFaceting="brand"
/>
searchClient: algoliasearch(
'ABCDEFGH',
'01234567890123456789',
{attributesForFaceting:'brandName'}
),
ais-refinement-list component with the attribuets brandName. NothingattributesForFaceting in the dashbaord configuation https://www.algolia.com/apps/VDJXSOGAAQ/explorer/configuration/INDEXNAME/facets Still cannot get results to work with optionalFiltersThese are my optional filters:
searchParameters: {
optionalFilters: 'brandName:SOMEBRANDNAME'
},
No hits fullfill the criteria of brandName:SOMEBRANDNAME even though there's many entries in my indice that have should.
The same set up works with official codesandbox.io example instant_search
Hi @mateuszgwozdz, methods which change the index require a "write" API key, as contrast with settings which don't change the index. You can set attributesForFaceting via the dashboard, or via a node (or other language) script, but not frontend
Please refresh, I edited the comment. I have tried that too

this happened because you changed the "sorting", putting sort-by before the basic textual filters, and thus always tie-breaking on "sort-index", and never using the regular sorts

I have fixed that for you, and it works as expected now
Yes, it works now as expected! Thank you!
For future reference, issues like this are best debugged by looking in the dashboard, where you can see the "trophy", which will explain why records are sorted as they are. There you can see that in your previous case, the ranking always came down to "sortIndex", which shouldn't be the tie-break, so it should come after other criteria.
I followed the trophy at the beginning, before setting optionalParameters, and then spent hours trying to solve this issue. Maybe ranking should never overwrite other paramters, or there could be a warning message displayed. I really tried my best before posting here