Repository navigation
[MOD-17353] Rust numeric top k: don't use emitted: HashSet<DocId> if the index is not for multi value fields - #10746
Conversation
💡 Codex ReviewWhen a filtered numeric When When a numeric range batch is large enough that ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
73d4ed6 to
caadd88
Compare
9f0e6d7 to
9390845
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10746 +/- ##
==========================================
- Coverage 84.22% 83.56% -0.66%
==========================================
Files 639 665 +26
Lines 85147 86494 +1347
Branches 39083 40302 +1219
==========================================
+ Hits 71711 72281 +570
- Misses 13072 13838 +766
- Partials 364 375 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
caadd88 to
e80dd12
Compare
617bf50 to
660d79c
Compare
e80dd12 to
7faf80d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7faf80db1a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7faf80d to
f1c41e7
Compare
660d79c to
67cff97
Compare
f1c41e7 to
03d6cb2
Compare
67cff97 to
e646de5
Compare
03c134a to
3c1640e
Compare
|
3c1640e to
6d37d8d
Compare
6d37d8d to
9864d5c
Compare
Ranges are value-disjoint, so a document with a single value occurs in exactly one range and cannot be reached twice by a value-ordered scan. Track whether the tree holds any multivalued document, and skip the per-record emitted-set lookup when it does not
9864d5c to
853bf23
Compare
GuyAv46
left a comment
There was a problem hiding this comment.
I'm surprised we didn't have this flag before, and that is_multivalued is only an input for the numeric add logic.
| last_doc_id: DocId, | ||
| /// Whether any document has been indexed under more than one value, as a | ||
| /// multivalue field does. See [`has_multivalued_docs`](Self::has_multivalued_docs). | ||
| has_multivalued_docs: bool, |
There was a problem hiding this comment.
Maybe worth mentioning that this flag is currently never cleared? Once we see a multi-value, it will never turn off
There was a problem hiding this comment.
added a mention on the public getter has_multivalued_docs
Well, we have a flag in the index, that's passed through We can argue it's a user error, but I figured it's inexpensive enough to carry a bool as we go through it to have a more accurate information. I don't know if |
|



Local benchmark
options
We can approach this in different ways: the cause of multiple docs being returned is when we use multi-value fields:
Mark if applicable
Release Notes
If a release note is required (bug fix / new feature / enhancement), describe the user impact of this PR in the title.