lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject lucene-solr:master: LUCENE-8142: Fix QueryUtils to only call getMaxScore when it is legal to do so.
Date Wed, 02 May 2018 15:42:46 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 82e7cb232 -> 67c13bbe2


LUCENE-8142: Fix QueryUtils to only call getMaxScore when it is legal to do so.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/67c13bbe
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/67c13bbe
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/67c13bbe

Branch: refs/heads/master
Commit: 67c13bbe2ebdab23c8ff316f8f0805529146a63d
Parents: 82e7cb2
Author: Adrien Grand <jpountz@gmail.com>
Authored: Wed May 2 17:41:26 2018 +0200
Committer: Adrien Grand <jpountz@gmail.com>
Committed: Wed May 2 17:42:18 2018 +0200

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/search/AssertingScorer.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/67c13bbe/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
index 952687f..a8c32cf 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
@@ -99,7 +99,7 @@ public class AssertingScorer extends Scorer {
     assert iterating() : state;
     final float score = in.score();
     assert !Float.isNaN(score) : "NaN score for in="+in;
-    assert score <= getMaxScore(DocIdSetIterator.NO_MORE_DOCS);
+    assert lastShallowTarget == -1 || score <= getMaxScore(docID());
     assert Float.compare(score, 0f) >= 0 : score;
     return score;
   }


Mime
View raw message