File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/linear Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+
2+ /*
3+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4+ * or more contributor license agreements. Licensed under the Elastic License
5+ * 2.0; you may not use this file except in compliance with the Elastic License
6+ * 2.0.
7+ */
8+
19package org .elasticsearch .xpack .rank .linear ;
210
311import org .apache .lucene .search .ScoreDoc ;
@@ -25,12 +33,12 @@ public ScoreDoc[] normalizeScores(ScoreDoc[] docs) {
2533 double sumOfSquares = 0.0 ;
2634 boolean atLeastOneValidScore = false ;
2735 for (ScoreDoc rd : docs ) {
28- if (! Float .isNaN (rd .score )) {
36+ if (Float .isNaN (rd .score ) == false ) {
2937 atLeastOneValidScore = true ;
3038 sumOfSquares += rd .score * rd .score ;
3139 }
3240 }
33- if (! atLeastOneValidScore ) {
41+ if (atLeastOneValidScore == false ) {
3442 // No valid scores to normalize
3543 return docs ;
3644 }
You can’t perform that action at this time.
0 commit comments