Skip to content

Implement BitSetIterator#docIDRunEnd#16072

Merged
iverase merged 3 commits into
apache:mainfrom
iverase:BitSetIterator
May 18, 2026
Merged

Implement BitSetIterator#docIDRunEnd#16072
iverase merged 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.

@iverase iverase added this to the 10.5.0 milestone May 15, 2026
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.

@iverase iverase merged commit 9f33b54 into apache:main May 18, 2026
13 checks passed
@iverase iverase deleted the BitSetIterator branch May 18, 2026 06:22
iverase added a commit that referenced this pull request May 18, 2026
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