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 c5187bf commit b4e7c70Copy full SHA for b4e7c70
x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/linear/L2ScoreNormalizer.java
@@ -32,10 +32,10 @@ public ScoreDoc[] normalizeScores(ScoreDoc[] docs) {
32
}
33
double sumOfSquares = 0.0;
34
boolean atLeastOneValidScore = false;
35
- for (ScoreDoc rd : docs) {
36
- if (Float.isNaN(rd.score) == false) {
+ for (ScoreDoc doc : docs) {
+ if (Float.isNaN(doc.score) == false) {
37
atLeastOneValidScore = true;
38
- sumOfSquares += rd.score * rd.score;
+ sumOfSquares += doc.score * doc.score;
39
40
41
if (atLeastOneValidScore == false) {
0 commit comments