Search facets that contain parenthesis

I wanted to find out, I’m making a call to Algolia to fetch results on a facet value that contains parenthesis eg, facet: ‘facet value (continue string)’ but if i pass this in, i just get back a 404 as it cant read the parenthesis as part of the string but rather an operator.

Is there a way to use the parenthis is the string when making a call?

Hi @nritsonsa,

Did you try wrapping the facet value in double quotes? Something like this should work:

{
  "filters": "authors:\"value (more value)\""
}

is it possible to do this using facetFilters? I have dynamic information being passed into the algolia call, and half that used facetFilters but breaks for the example I mentioned, however, if I change it to filters it does work, but all the others break but they are all from the same Facet the only difference is the one with the parenthesis.

you get a string back like this which doesn’t work because of the quotes inside:
publishers:‘some value (more values)’

Yes it should work, in this form: ["authors:test (test)"]

Which JS library are you using? Did you try using the helper, with the addFacetRefinement method? This will remove the need for you to build the params manually.

im not using the react instantsearch, i make a call to a functon passing in:

fetchStaticQuery(UrlFacetType, UrlFacetValue, pagenumber);

export function fetchStaticQuery(UrlFacetType, UrlFacetValue, callPage) {
  const indexNewReleases = searchSetup(`${process.env.REACT_APP_ALGOLIA_INDEX_NAME}`);
  return indexNewReleases.search({
  facetFilters: `${UrlFacetType}:${UrlFacetValue}`,
  page: callPage,
  hitsPerPage: 36,
 });
}

the value saved in Algolia is called 6S Escape (Training Software)
when I log the value passed into the call, its exactly as it is in Algolia but no results are returned. All other results are returned, its just this one that isnt, but this is the only one that had parenthesis in it.