perf(fts): bound classic conjunction scoring in dense windows - #9033
perf(fts): bound classic conjunction scoring in dense windows#9033BubbleCal wants to merge 1 commit into
Conversation
Certify dense posting ranges before progressive scoring, retain conservative suffix bounds and exact query-order scores, and reuse zero-floor windows and lazy norm lookup. Preserve sparse, phrase, and compound-cursor behavior. Share test fixtures without removing assertions or parameter coverage.
There was a problem hiding this comment.
The score-first path preserves canonical score bits and floor semantics in the focused regression set, and its strict eligibility keeps unsupported scorers and formats on the existing path.
The remaining risk is performance rather than correctness: this layer adds dense-window certification and a lazy norm cache without an isolated latency/CPU comparison, so its net benefit—and possible short-tail overhead—remains unverified. Keep the scope narrow until representative classic 4/5-term workloads confirm the trade-off; if the incremental gain is small, progressive scoring after full DocID alignment is the simpler alternative.
This PR is stacked on #9032, which depends on #9031; the safe landing order remains #9031 → #9032 → this PR.
Classic 4/5-term AND evaluation can decode and score every follower even when a partial exact score already proves the candidate cannot compete. Applying score-first evaluation universally is costly when posting overlap is low. This PR enables it only inside a metadata-certified dense range.
f32scores and inclusive tie behavior.The classic path remains used by compound
WandCursorand explicit classic searches after #9030 enables standalone wide-query bulk routing.Most of this diff is regression coverage: approximately 327 production-section additions and 1,334 test additions. Shared fixtures retain the distinct dense/sparse, malformed-metadata, short-tail, high-DocID, score-bit, tie, norm-fallback, seek/shallow, and floor-transition cases. No isolated
mainA/B result is claimed for this layer.Validation
main/release/**bases; this intermediate layer has been tested and linted locally. The full hosted matrix will run after its base is retargeted tomainfollowing the parent merge.Stack, 3/4: #9031 → #9032 → this PR → #9030. Base: #9032. Uses the lazy posting-cursor support introduced in #9031.
Merge in stack order; retarget/restack the remaining PRs after their parent merges.