mirror of https://github.com/apache/lucene.git
comments
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@782625 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
734ee07107
commit
9382159d10
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue