jpountz commented on code in PR #14543:
URL: https://github.com/apache/lucene/pull/14543#discussion_r2060222310


##########
lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java:
##########
@@ -315,6 +318,9 @@ public void testDisjunctionLeadCost() throws IOException {
     new BooleanScorerSupplier(
             new FakeWeight(), subs, RandomPicks.randomFrom(random(), 
ScoreMode.values()), 0, 100)
         .get(100); // triggers assertions as a side-effect
+    new BooleanScorerSupplier(
+            new FakeWeight(), subs, RandomPicks.randomFrom(random(), 
ScoreMode.values()), 0, 100)
+        .bulkScorer(); // triggers assertions as a side-effect

Review Comment:
   Thanks, I had only run lucky seeds that had not exercised 
ScoreMode.TOP_SCORES, which triggers different logic for producing a bulk 
scorer (MaxScoreBulkScorer instead of BooleanScorer). This is a real failure.
   
   I decided to relax assertions a bit instead of refactoring 
BooleanScorerSupplier too much, since all cases when the lead cost is greater 
than or equal to the cost of a clause are practically equivalent and mean that 
this clause is leading iteration. This also helped simplify tests a bit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to