michaeljmarshall commented on code in PR #16588:
URL: https://github.com/apache/lucene/pull/16588#discussion_r3898148930


##########
lucene/core/src/java/org/apache/lucene/search/AcceptDocs.java:
##########
@@ -176,7 +176,10 @@ private static class DocIdSetIteratorAcceptDocs extends 
AcceptDocs {
 
     private void createBitSetAcceptDocsIfNecessary() throws IOException {
       if (acceptBitSet == null) {
-        acceptBitSet = Objects.requireNonNull(createBitSet(iterator(), 
liveDocs, maxDoc));
+        // Pass the raw iterator: #createBitSet applies liveDocs itself, and 
filtering upfront
+        // would hide DocIdSetIterator#intoBitSet behind a wrapper that has no 
bulk implementation.
+        DocIdSetIterator iterator = 
Objects.requireNonNull(iteratorSupplier.get());

Review Comment:
   Thanks for the explanation, I hadn't read that part of the `intoBitSet` 
javadoc and missed the detail that only `FixedBitSet` uses the `intoBitSet`.



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

Reply via email to