Reputation: 161
The _search
API in the elastic search provides the results document with positive scores. What can be the least score in a set of documents other than zero?
This can be helpful to use the min_score
parameter to avoid the documents without non-zero score results.
Upvotes: 2
Views: 279
Reputation: 10346
Score in elasticsearch has to be a positive 32-bit floating point. As per the documentation
In Elasticsearch, all document scores are positive 32-bit floating point numbers.
If the script_score function produces a score with greater precision, it is converted to the nearest 32-bit float.
Similarly, scores must be non-negative. Otherwise, Elasticsearch returns an e
So it can go quite low
Floating Point | Largest value | Smallest value1 |
---|---|---|
32-bit Float | 3.4028237 × 1038 | 1.175494 × 10-38 |
Upvotes: 2