HUSTERGS commented on code in PR #16515:
URL: https://github.com/apache/lucene/pull/16515#discussion_r3821654568
##########
lucene/core/src/java/org/apache/lucene/search/Scorer.java:
##########
@@ -130,4 +131,30 @@ public void nextDocsAndScores(int upTo, Bits liveDocs,
DocAndFloatFeatureBuffer
}
buffer.size = size;
}
+
+ /**
+ * Return a new batch of doc IDs and scores, retaining only docs whose bit
at {@code doc - offset}
+ * is set in {@code acceptDocs}.
+ *
+ * <p>The default implementation checks the mask before computing scores.
Implementations may
+ * override this method in order to retrieve documents in batches.
+ *
+ * @lucene.internal
+ */
+ public void nextDocsAndScores(
Review Comment:
I think we should not add a new method like this. Wraping a FixedBitSet as
Bits and reusing `nextDocsAndScores` can let all kinds of Scorer benefit from
this change, and they don't need to write their own new version of
`nextDocsAndScores`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]