stefanvodita commented on code in PR #12442:
URL: https://github.com/apache/lucene/pull/12442#discussion_r1264364625


##########
lucene/test-framework/src/java/org/apache/lucene/tests/search/QueryUtils.java:
##########
@@ -675,7 +675,14 @@ public static void checkBulkScorerSkipTo(Random r, Query 
query, IndexSearcher se
     query = searcher.rewrite(query);
     Weight weight = searcher.createWeight(query, ScoreMode.COMPLETE, 1);
     for (LeafReaderContext context : searcher.getIndexReader().leaves()) {
-      final Scorer scorer = weight.scorer(context);
+      final Scorer scorer;
+      if (weight.scorerSupplier(context) != null) {
+        // For IndexOrDocValuesQuey, the bulk scorer will use the indexed 
structure query
+        // and the scorer with a lead cost of 0 will use the doc values query.
+        scorer = weight.scorerSupplier(context).get(0);

Review Comment:
   I had some doubts if we should use a lead cost of 0 across the board, but it 
doesn't seem as if any tests relied on it.



-- 
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