Dynamic pruning for SORTED(_SET) fields with doc values skipper#15511
Dynamic pruning for SORTED(_SET) fields with doc values skipper#15511bugmakerrrrrr merged 3 commits intoapache:mainfrom
Conversation
| this.maxOrd = maxOrd; | ||
|
|
||
| final TwoPhaseIterator twoPhaseIterator = | ||
| new DocValuesRangeIterator(innerTwoPhase, skipper, minOrd, maxOrd, false); |
There was a problem hiding this comment.
One thing that I've been meaning to test with numeric comparators but haven't got round to yet: I wonder if its worth replacing this usage of DocValuesRangeIterator with something that only advances to skip-block boundaries? My reasoning being that if the parent query is reasonably sparse, then calling advance() on this competitive iterator might end up doing a bunch of work to find the precise first matching value within a block that is then immediately thrown away when we leapfrog back and call advance() on the parent iterator. Whereas if we just advance to the first competitive block then we can let the parent query do the work.
There was a problem hiding this comment.
I had the same thought. When I implemented this, I considered whether approximation could serve as a competitive iterator, but I haven't figured out when to do that.
Description
Similar to #14672, this commit takes advantage of doc values skipper to do the dynamic pruning for SORTED(_SET) fields.