You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "stefanvodita (via GitHub)" <gi...@apache.org> on 2023/07/15 09:09:34 UTC

[GitHub] [lucene] stefanvodita commented on a diff in pull request #12442: Assert IdxOrDvQuery subqueries and document useful fields

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-unsubscribe@lucene.apache.org

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


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