sgup432 opened a new pull request, #15954: URL: https://github.com/apache/lucene/pull/15954
### Description Replace DocValuesRangeIterator with SkipBlockRangeIterator as the two-phase approximation when a DocValuesSkipper is available. This makes the approximation block-level only (no DV decoding), deferring value reads to matches(). In conjunctions, this avoids wasted DV decoding when another field's block is NO. This was done as suggested in the comment here - https://github.com/apache/lucene/issues/15770#issuecomment-4212419321 by @romseygeek Also includes benchmark: Results: ``` ### JMH Benchmark Results (1M docs, ops/s, higher is better) | Pattern | Fields | Before (ops/s) | After (ops/s) | Speedup | |-----------|--------|----------------|---------------|---------| | clustered | 3 | 15,890 | 18,505 | 1.16x | | clustered | 5 | 11,546 | 12,959 | 1.12x | | mixed | 3 | 854 | 937 | 1.10x | | mixed | 5 | 512 | 723 | 1.41x | | random | 3 | 60 | 68 | 1.13x | | random | 5 | 44 | 51 | 1.16x | ``` Data patterns: - **clustered**: all field values increase with docID (time-series style) - **mixed**: field0 monotonic, field1 low-cardinality (20 values), rest random (e-commerce style) - **random**: all fields uniformly random, wide query ranges (worst case) Query: BooleanQuery with N FILTER clauses, each a `SortedNumericDocValuesField.newSlowRangeQuery` on a distinct field with skip index enabled. <!-- 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]
