Closed RafaRuiz closed 6 years ago
Solved quoting categoryFilter
:
query.filters = "$filteringCategoryFacet:\"$categoryFilter\""
Beware.
Hi @RafaRuiz, thanks for your report! Glad to see you could resolve it directly, hopefully this will be helpful to anyone else experiencing the same.
First of all I have to say that the language I'm using is Kotlin.
I'm trying to get rid of legacy code and convert all
query.faceFilters =
toquery.filters =
(set functions).What I was using (and it was working) in this issue was:
query.facetFilters = JSONArray("[\"$filteringCategoryFacet:$categoryFilter\"]")
but since it's deprecated, it worked with:
query.filters = "$filteringCategoryFacet:$categoryFilter"
Case working:
so I would be inserting:
query.filters = "category.lvl1:Womens"
Case not working
so I would be inserting
query.filters = "category.lvl2:Womens>Tailoring"
which results in the error:
com.algolia.search.saas.AlgoliaException: filters: Unexpected token > expected end of filter at col 20
I tried to replace
>
by%3E
. It didn't throw an error but it didn't give me any result, asquery.faceFilters
was giving some.What is wrong with it?