Skip to content

Skip scoring in unscored Boolean term unions - #3223

Closed
PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:union-no-score
Closed

PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:union-no-score

Conversation

@PSeitz

@PSeitz PSeitz commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

BooleanWeight::for_each_no_score initially builds its scorer with DoNothingCombiner, but its specialized multi-term union branch then builds a buffered union with the configured scoring combiner. This can perform score updates during document-only traversal.

Use DoNothingCombiner for that buffered union too. The existing dispatch and buffered traversal remain unchanged.

Add a regression through BooleanWeight::for_each_no_score using frequency-reading term weights to reach the specialized dispatch and a custom combiner that panics on score updates or score retrieval. It also checks ordered, deduplicated document IDs, including documents matching both terms.

Validation

  • Confirmed the regression fails before the fix with the score-update panic.
  • cargo test --lib test_for_each_no_score_term_union_skips_scoring passes after the fix.
  • cargo test --lib: 1,344 passed, 8 ignored.
  • cargo +nightly fmt --all
  • git diff --check

Disclosure

Implemented and tested with AI assistance.

Use DoNothingCombiner when for_each_no_score materializes a specialized multi-term union. Preserve the existing buffered traversal while avoiding the configured combiner's score updates.

Exercise BooleanWeight dispatch with frequency-reading term weights and a combiner that panics on scoring. Verify the union's ordered, deduplicated document IDs.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T15:49:17.048284Z bc5424d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@PSeitz
PSeitz marked this pull request as draft October 28, 2026 16:14
@PSeitz PSeitz closed this Oct 28, 2026
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