costin commented on code in PR #16623:
URL: https://github.com/apache/lucene/pull/16623#discussion_r3987420825
##########
lucene/core/src/java/org/apache/lucene/util/SparseLiveDocs.java:
##########
@@ -144,6 +144,21 @@ public int deletedCount() {
return deletedCount;
}
+ @Override
+ public FixedBitSet toFixedBitSet() {
+ FixedBitSet result = new FixedBitSet(maxDoc);
+ result.set(0, maxDoc);
+ for (int del = deletedDocs.nextSetBit(0);
+ del != DocIdSetIterator.NO_MORE_DOCS;
+ del =
+ del + 1 >= maxDoc
+ ? DocIdSetIterator.NO_MORE_DOCS
+ : deletedDocs.nextSetBit(del + 1)) {
+ result.clear(del);
+ }
Review Comment:
Good idea. Since that PR was merged, I've updated the code.
--
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]