Facets with - deliver wrong results

we are using Algolia with Magento2.
In cases where the facet value is something like “-20° C” the result is not correct.
In a total list of 33K product, the facet shows, that 159 of them have the facet value “-20° C”.
When I apply the facet, the list result is still 33K, although the facet is ticked.
This is the same in the Magento Frontend as in the Algolia Backend, so I assume it is not a Magento issue.

Any hint about how to deal with facet values that have a minus in it or start with a minus?


@haroen @betty.suravech
You guy helped me before and I do not get a reply to this question. Any idea?

Thanks a lot

if a facet value starts with - it can in some cases (the dashboard in this case) be interpreted as a negation of that facet instead of the actual facet. You can solve this by crafting the query explicitly as \-20° or using a different character like (the actual minus symbol)

Hi Everyone,

If a facet value begins with -, it can be read as a negation of that facet rather than the real facet in some circumstances (such as the dashboard in this case). You may solve this by specifying -20° in the query or by using an alternative character, such as (the actual minus symbol)

If any Query about Facets Training, Please Contact us we have a professional team to do this.