Advance to first position of 1 in BitSet before iterating the lead in BitSetConjunctionDISI?
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
In `BitSetConjunctionDISI`, we iterate over the `DocIdSetIterator` of lead, and then lookup the BitSets to get conjunction. currently, we use `bitSet.length()` to limit the termination of the iteration, the similarly, maybe we can consider use `bitSet.nextSetBit(0)` to set the start doc of the iteration. some scenarios may have more zeros at the beginning of the BitSet, for instance, the retention query in Elasticsearch using an increasing number field(_seq_no), it may save the result to BitSet with more leading zeros.
Contributor guide
Research direction
Start at BitSetConjunctionDISI and inspect the lead DocIdSetIterator loop, especially how bitSet.length() currently limits iteration. Reproduce or test the leading-zero BitSet scenario described in the issue, then confirm that iteration begins at the first set bit and still produces the correct conjunction results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100