Fix intersection regression with fastfield range queries - #3007
Draft
PSeitz wants to merge 3 commits into
Draft
Conversation
add regression query fix naming in benchmark build unified index for benchmarks
PSeitz-dd
force-pushed
the
fix_intersection_regression
branch
from
July 23, 2026 16:12
dfc0475 to
80ed545
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a performance regression for intersection with fast field range queries.
When intersecting term queries with range queries, the term is "leading" the intersection and asks range queries using
seek_dangerif a doc exists in theDocSet.seek_dangerin the current form does always do point lookups. For blocks of docids using the variant that checks blocks of docids in the columnar store is more efficient. (E.g. if we receive consecutive calls with docids in seek_danger1,2,3,4...128).The break even is roughly at ~24 point lookups for a 128 doc block (the default fetch range in the columnar store). We don't know up front, which docids will come next and when a fetch_block variant is more efficient so this implements a heuristic to try to do educated guesses.
This also extends the benchmarks to try to do clustering of documents for terms and not uniform distributed (like real data)