Skip to content

Fix intersection regression with fastfield range queries - #3007

Draft
PSeitz wants to merge 3 commits into
quickwit-oss:mainfrom
PSeitz:fix_intersection_regression
Draft

Fix intersection regression with fastfield range queries#3007
PSeitz wants to merge 3 commits into
quickwit-oss:mainfrom
PSeitz:fix_intersection_regression

Conversation

@PSeitz

@PSeitz PSeitz commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

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_danger if a doc exists in the DocSet.

seek_danger in 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_danger 1,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)

PSeitz added 3 commits July 23, 2026 18:09
add regression query
fix naming in benchmark
build unified index for benchmarks
@PSeitz-dd
PSeitz-dd force-pushed the fix_intersection_regression branch from dfc0475 to 80ed545 Compare July 23, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant