kkewwei opened a new pull request, #16897: URL: https://github.com/apache/lucene/pull/16897
### Description DocValues range query currently use `DocValuesValueRangeIterator` when no `DocValuesSkipper` is available. Its default `intoBitSet` implementation is predicating doc by doc, even though `NumericDocValues`, `SortedNumericDocValues` and `SortedDocValues` already provide bulk range APIs. This change allows `DocValuesValueRangeIterator` to use an optional bulk range when no skipper is available. It enables the classes: - `NumericDocValues.rangeIntoBitSet` - `SortedNumericDocValues.rangeIntoBitSet` - `SortedDocValues.ordinalRangeIntoBitSet` Once the #16867 is merged, I will enable `SortedSetDocValues.ordinalRangeIntoBitSet` While testing this change, I encountered a test failure caused by an overflow when transforming query bounds for GCD-encoded DocValues #16896, so this change depends on that fix. ### Benchmark I use SortedNumericDocValuesRangeQueryBenchmark to test without skip indexes: | Density | Selectivity | Baseline | Candidate | Improvement | |---|---:|---:|---:|---:| | Dense | 0.01 | 28.70 ops/s | 34.52 ops/s | **+20.3%** | | Dense | 0.1 | 25.69 ops/s | 31.59 ops/s | **+22.9%** | | Dense | 0.5 | 29.17 ops/s | 37.67 ops/s | **+29.1%** | | Sparse | 0.01 | 34.23 ops/s | 43.08 ops/s | **+25.8%** | | Sparse | 0.1 | 33.19 ops/s | 39.27 ops/s | **+18.3%** | | Sparse | 0.5 | 33.61 ops/s | 44.99 ops/s | **+33.9%** | gains ranging from **18.3% to 33.9%**, with no performance regression was observed. <!-- If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide. https://github.com/apache/lucene/blob/main/CONTRIBUTING.md --> -- 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]
