BOOSTS not always works

Hello,

We are using relevance tuning to enhance various search fields. We have a text type field, made up of several arrays of charts. In this case, we can enhance or reduce the weight of the search when one of the elements of the array is "inoffer", both positively and negatively.

Screenshot_1

To do the test, we can lower the score of a product when it is on sale, which is perfect, it works as we expected.

We have the problem in the next field, "priority" of type number. This contains the priority of a product. The priority values ​​go from -99 to 100. What we want is that when the priority is -99, apply a negative boots to obtain less score. No matter what type of WEIGHT set, the score is never modified. We have even tried changing the priority to text. Nothing works, neither positive nor negative.
The only way for this field to affect the score is to use a function, but what we want is to apply a specific value.
Screenshot_3

We have done one more test, we have a name field of type text that contains the name of the product. In this case when there is a match with the name, a positive weight causes a higher score, but a negative weight has no effect on the score. Does not matter if we enable or not the search this field

Can someone tell us what may be happening?

Thanks for your support

Hi @PabloUrbano ,

Unfortunately, "negative boosts" are not a thing. See here that the boost factor must be between 0 and 10. Search API boosts | App Search documentation [8.11] | Elastic

I do see that we don't state that explicitly in the boosts guide, and we have a known issue that the UI allows you to enter in negative numbers. Sorry for the confusion, we're on it.

However, even without negative boosts, I think you could accomplish what you want. Perhaps an Exponential Proximity boost on your priority field would do the trick?

Same known issue, I'm afraid. Legal weights are between 1 and 10. No negatives.

Hope this all helps!

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