jbasko
jbasko

Reputation: 7330

What is the value range of _score (relevance) in ES function_score?

While trying to use function_score with boost_mode: "sum" (because it makes it easier to trace different contributions), I want to normalise query relevance's effect on overall document score, but for that I need to know what values can it take. At first I assumed (0, 1), but it's clearly not so as I also see scores above 1.0.

Upvotes: 0

Views: 134

Answers (1)

imotov
imotov

Reputation: 30163

It depends on the query that you are wrapping and the number of records in the index. The way lucene calculates the score is quite complicated and it's difficult to predict the range in a general case. I would recommend using multiply as a boost_mode instead of sum, it typically produces better results.

Upvotes: 1

Related Questions