-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check to directly use ANN Search when filters match all docs. #2320
Merged
+159
−6
Conversation
This file contains 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
heemin32
reviewed
Dec 11, 2024
heemin32
reviewed
Dec 11, 2024
Signed-off-by: Wei Wang <[email protected]>
weiwang118
force-pushed
the
mainline-wei
branch
from
December 18, 2024 15:16
e05c94f
to
fbc6cf9
Compare
weiwang118
requested review from
navneet1v,
VijayanB,
vamshin,
jmazanec15,
naveentatikonda,
junqiu-lei,
martin-gaievski,
ryanbogan,
luyuncheng and
shatejas
as code owners
December 18, 2024 17:05
weiwang118
force-pushed
the
mainline-wei
branch
from
December 18, 2024 18:12
5cebe5c
to
d39c6e8
Compare
VijayanB
reviewed
Dec 18, 2024
Signed-off-by: Wei Wang <[email protected]>
weiwang118
force-pushed
the
mainline-wei
branch
from
December 19, 2024 11:33
d39c6e8
to
105c39a
Compare
weiwang118
force-pushed
the
mainline-wei
branch
from
December 27, 2024 17:27
50c96f3
to
7f06ea4
Compare
navneet1v
reviewed
Dec 29, 2024
shatejas
reviewed
Dec 31, 2024
src/test/java/org/opensearch/knn/integ/FilteredSearchANNSearchIT.java
Outdated
Show resolved
Hide resolved
weiwang118
force-pushed
the
mainline-wei
branch
2 times, most recently
from
January 2, 2025 15:55
fdba64d
to
c599062
Compare
VijayanB
reviewed
Jan 2, 2025
VijayanB
reviewed
Jan 2, 2025
weiwang118
force-pushed
the
mainline-wei
branch
from
January 3, 2025 12:45
86e1aa1
to
a0e06d6
Compare
Signed-off-by: Wei Wang <[email protected]>
weiwang118
force-pushed
the
mainline-wei
branch
from
January 3, 2025 12:47
a0e06d6
to
a5187d2
Compare
VijayanB
approved these changes
Jan 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @weiwang118 for making changes and addressing comments
shatejas
approved these changes
Jan 3, 2025
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jan 3, 2025
) * Add check to directly use ANN Search when filters match all docs. Signed-off-by: Wei Wang <[email protected]> * Fix failed tests and rebase on main branch Signed-off-by: Wei Wang <[email protected]> * pass filterbitset as null and add integ tests. Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Co-authored-by: Wei Wang <[email protected]> (cherry picked from commit 6f5313f)
weiwang118
added a commit
to weiwang118/k-NN
that referenced
this pull request
Jan 6, 2025
…ensearch-project#2320) * Add check to directly use ANN Search when filters match all docs. Signed-off-by: Wei Wang <[email protected]> * Fix failed tests and rebase on main branch Signed-off-by: Wei Wang <[email protected]> * pass filterbitset as null and add integ tests. Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Co-authored-by: Wei Wang <[email protected]> (cherry picked from commit 6f5313f) Signed-off-by: Wei Wang <[email protected]>
Merged
5 tasks
VijayanB
pushed a commit
that referenced
this pull request
Jan 6, 2025
) (#2367) * Add check to directly use ANN Search when filters match all docs. * Fix failed tests and rebase on main branch * pass filterbitset as null and add integ tests. --------- (cherry picked from commit 6f5313f) Signed-off-by: Wei Wang <[email protected]> Co-authored-by: Wei Wang <[email protected]>
Gankris96
pushed a commit
to Gankris96/k-NN
that referenced
this pull request
Jan 8, 2025
…ensearch-project#2320) * Add check to directly use ANN Search when filters match all docs. Signed-off-by: Wei Wang <[email protected]> * Fix failed tests and rebase on main branch Signed-off-by: Wei Wang <[email protected]> * pass filterbitset as null and add integ tests. Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Co-authored-by: Wei Wang <[email protected]>
owenhalpert
pushed a commit
to owenhalpert/k-NN
that referenced
this pull request
Jan 9, 2025
…ensearch-project#2320) * Add check to directly use ANN Search when filters match all docs. Signed-off-by: Wei Wang <[email protected]> * Fix failed tests and rebase on main branch Signed-off-by: Wei Wang <[email protected]> * pass filterbitset as null and add integ tests. Signed-off-by: Wei Wang <[email protected]> --------- Signed-off-by: Wei Wang <[email protected]> Co-authored-by: Wei Wang <[email protected]>
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.
Description
This change aims to resolve this github issue: #1387
by adding a simple check in searchLeaf method so that if the filters match all doc IDs in the segment (Max Doc == size of FilterBitSet), then we directly do ANN search and avoid other unnecessary steps. This will help improve the search performance.
Related Issues
Resolves #1387
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.