We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 346d3dd commit 6b066beCopy full SHA for 6b066be
x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/linear/MinMaxScoreNormalizer.java
@@ -56,7 +56,9 @@ public ScoreDoc[] normalizeScores(ScoreDoc[] docs) {
56
for (int i = 0; i < docs.length; i++) {
57
float score;
58
if (minEqualsMax) {
59
- score = min;
+ // This can happen if there is only one doc in the result set or if all docs have nearly equivalent scores
60
+ // (i.e. within epsilon). In this case, assign every doc the max normalized score.
61
+ score = 1.0f;
62
} else {
63
score = (docs[i].score - min) / (max - min);
64
}
0 commit comments