Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

comments

Yonik Seeley9382159d10e0
diff --git a/src/java/org/apache/solr/search/function/BoostedQuery.java b/src/java/org/apache/solr/search/function/BoostedQuery.java
index 83e547b0c45..93551142187 100755
--- a/src/java/org/apache/solr/search/function/BoostedQuery.java
+++ b/src/java/org/apache/solr/search/function/BoostedQuery.java
@@ -122,7 +122,7 @@ public class BoostedQuery extends Query {
public float score() throws IOException {
float score = qWeight * scorer.score() * vals.floatVal(scorer.doc());
- // current Lucene sorting priority queues can't handle NaN and -Infinity
+ // current Lucene sorting priority queues can't handle NaN (score!=score is true for NaN) and -Infinity
if (score != score || score==Float.NEGATIVE_INFINITY) return -Float.MAX_VALUE;
return score;
}
diff --git a/src/java/org/apache/solr/search/function/FunctionQuery.java b/src/java/org/apache/solr/search/function/FunctionQuery.java
index 1775cdf58d3..07a718f2c41 100644
--- a/src/java/org/apache/solr/search/function/FunctionQuery.java
+++ b/src/java/org/apache/solr/search/function/FunctionQuery.java
@@ -133,7 +133,7 @@ public class FunctionQuery extends Query {
public float score() throws IOException {
float score = qWeight * vals.floatVal(doc);
- // current Lucene sorting priority queues can't handle NaN and -Infinity
+ // current Lucene sorting priority queues can't handle NaN (score!=score is true for NaN) and -Infinity
if (score != score || score==Float.NEGATIVE_INFINITY) return -Float.MAX_VALUE;
return score;
}