Intelligent Search API - parentheses in the name of a facet

Hi all,

I need to use a specification that contains parenthesis in the intelligent-search/product_search api.

The api works with every specification used as facet, except for “size (cm)” and I think because it contains parentheses. The url is something like this

https://{accountName}.{environment} (cm)/50

and always returns zero results.

Any ideas on how to fix it?

Hello Enrico,

I believe this might indeed be a platform limitation (the Intelligent Search team generally recommends avoiding special characters like these in facets) but just in case, have you tried doing the same search with URL encoding? By that I mean replacing the parentheses with their ASCII formatting, like this: %28cm%29

Could you give it a try and share the result? I will try and look into previous cases and/or documentation in the meantime.

Eduardo Luciano
Field Software Engineer | VTEX

Hi Eduardo,

thank you for your answer. Yes unfortunately I tried every url encoding possible but it does not work :frowning:

Hi Enrico,

That’s too bad :confused:

When talking with the team, they recommended using the Get list of the possible facets for a given query to check how this facet is being indexed by the search, then using that value for the Get list of products for a query API. Could you give that a try?

Hi Eduardo,

I finally managed to solve it by replacing the special characters with a hyphen -

Thanks for the support!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.