-
Notifications
You must be signed in to change notification settings - Fork 143
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
Enabled Filtering on Nested Vector fields with top level filters #1372
Conversation
fd3f6b8
to
0499518
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1372 +/- ##
============================================
+ Coverage 85.10% 85.16% +0.05%
- Complexity 1254 1258 +4
============================================
Files 163 163
Lines 5104 5110 +6
Branches 477 479 +2
============================================
+ Hits 4344 4352 +8
+ Misses 554 553 -1
+ Partials 206 205 -1 ☔ View full report in Codecov by Sentry. |
src/test/java/org/opensearch/knn/index/AdvancedFilteringUseCasesIT.java
Outdated
Show resolved
Hide resolved
Build is failing. |
its from windows and it is an IT. |
0499518
to
1aa0248
Compare
@navneet1v need to run spotlessApply |
Signed-off-by: Navneet Verma <[email protected]>
1aa0248
to
9bf2e60
Compare
some how got missed. will run it |
Signed-off-by: Navneet Verma <[email protected]> (cherry picked from commit 271df52)
Signed-off-by: Navneet Verma <[email protected]> (cherry picked from commit 271df52)
…) (#1377) Signed-off-by: Navneet Verma <[email protected]> (cherry picked from commit 271df52) Co-authored-by: Navneet Verma <[email protected]>
Seems following query does not work where both top field and nested field filter is applied when knn is defined inside nested field.
|
Your filter query clause is not correct. As it contains both nested and non nested fields, include the nested context in the filter query otherwise Opensearch has no way to identify that query has nested fields. example
|
Description
Enabled Filtering on Nested Vector fields with top level filters.
After this change, below use case for filtering is supported with vector search(both Lucene and Faiss). The change is BWC.:
To ensure that any further changes in the filter code we are able to catch the bugs, I added a new IT test class
AdvancedFilteringUseCasesIT
which has integration tests for all the above use-cases.Context
There was feature gap in the efficient filter for both Faiss and Lucene engine, where the filtering was not working with vector search when vector field is a nested field and filter query has the top level fields.
Please refer #1356 for more details.
Issues Resolved
#1356
Testing
Apart from IT, I did the manual testing for all the below cases. Please check the #1356 for more details the query payloads.
Check List
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.