Gravatar for dsoriano@littelfuse.com

Question by Dean, May 8, 2019 1:20 AM

Filtering with negative values

Hi,

We have a facet that contains numeric values (both positive and negative).

Our struggle is, say we have the following facet values, 65, 100, -65, -85 etc.

If we filter by -65, even the positive 65 value gets returned, which is not desired. What we want is only the filtered value i.e -65 to show up.

We noticed that the field is being indexed as a String type in Coveo. Has that something to do with the filtering behavior?

What is the recommended practice/solution in these cases?

Thanks

Dean

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, May 8, 2019 1:42 AM

If the field is string inside Coveo, "-65" is indexed as " 65" (space 65) and is the same as positive "65". It is then normal that your filters are behaving like this.

You must find out why the field is created as string inside Coveo and fix this.

Gravatar for dsoriano@littelfuse.com

Comment by Dean, May 8, 2019 1:46 AM

Thanks @Jean-François L'Heureux, how do we explicitly change the field type for Coveo to properly index it?

Ask a question