Skip to content
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

Handle multi-vector in exact search scenario #1378

Merged

Conversation

heemin32
Copy link
Collaborator

@heemin32 heemin32 commented Jan 8, 2024

Description

When filter query is provided using Faiss engine, knn search can be run in exact search mode instead of ANN mode based on few conditions. One of the condition is when k is larger than the size of list of filtered IDs.
This PR handles multi-vector in the exact search mode with Faiss engine.

Issues Resolved

#1065

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --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.

Copy link
Collaborator

@navneet1v navneet1v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments related to the new interface classes which we have created. I think we can do quite a lot better there. Let's see if we really need the interface and those extra functions.

@heemin32 heemin32 force-pushed the exact-search branch 2 times, most recently from 2613609 to 34a19e8 Compare January 9, 2024 18:19
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0abed23) 85.20% compared to head (960048a) 85.28%.

❗ Current head 960048a differs from pull request most recent head 56e5dc6. Consider uploading reports for the commit 56e5dc6 to get more accurate results

Files Patch % Lines
.../knn/index/query/filtered/KNNFloatQueryVector.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##             feature/multi-vector    #1378      +/-   ##
==========================================================
+ Coverage                   85.20%   85.28%   +0.08%     
- Complexity                   1260     1276      +16     
==========================================================
  Files                         163      167       +4     
  Lines                        5115     5159      +44     
  Branches                      479      482       +3     
==========================================================
+ Hits                         4358     4400      +42     
- Misses                        552      554       +2     
  Partials                      205      205              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@heemin32 heemin32 force-pushed the exact-search branch 2 times, most recently from 9f82400 to ac97dc1 Compare January 9, 2024 20:21
Signed-off-by: Heemin Kim <heemin@amazon.com>
@heemin32
Copy link
Collaborator Author

Build is failing due to lucene codec upgrade.

@navneet1v
Copy link
Collaborator

Seeing this code is going in a feature branch, broken CI is fine. But when the whole code will be merged in main branch lets ensure that CIs are successful.

@heemin32 heemin32 merged commit 2664a5a into opensearch-project:feature/multi-vector Jan 10, 2024
8 of 48 checks passed
@heemin32 heemin32 deleted the exact-search branch July 18, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants