Skip to content

Implement BitSetIterator#docIDRunEnd#16072

Open
iverase wants to merge 3 commits into
apache:mainfrom
iverase:BitSetIterator
Open

Implement BitSetIterator#docIDRunEnd#16072
iverase wants to merge 3 commits into
apache:mainfrom
iverase:BitSetIterator

Conversation

@iverase
Copy link
Copy Markdown
Contributor

@iverase iverase commented May 15, 2026

In order to make it efficient, i added a new method to the BitSet interface called #nextClearBit which is implemented for the subclasses.

Copy link
Copy Markdown
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a CHANGES entry under optimizations I would think

} while (aa != DocIdSetIterator.NO_MORE_DOCS);
}

void doNextClearBit(java.util.BitSet a, FixedBitSet b) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am misunderstanding how FixedbitSet is tested, but I would expect something like we have in the sparse tests with testNextClearBit with random inputs matching up the brute-force next clear bit set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is mimicking the implementation of #doNextSetBit so it is how FixedBitSet is tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants