Add parent join support for lucene knn#1182
Merged
heemin32 merged 1 commit intoopensearch-project:mainfrom Oct 10, 2023
Merged
Conversation
This was referenced Oct 2, 2023
Collaborator
|
@heemin32 can you add an example how you tested this change? |
src/main/java/org/opensearch/knn/index/query/KNNQueryFactory.java
Outdated
Show resolved
Hide resolved
Collaborator
Author
3536368 to
91c200d
Compare
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #1182 +/- ##
============================================
+ Coverage 84.95% 85.01% +0.06%
- Complexity 1190 1210 +20
============================================
Files 159 160 +1
Lines 4838 4932 +94
Branches 440 449 +9
============================================
+ Hits 4110 4193 +83
- Misses 530 540 +10
- Partials 198 199 +1
|
martin-gaievski
approved these changes
Oct 5, 2023
navneet1v
reviewed
Oct 10, 2023
| } | ||
|
|
||
| log.debug(String.format("Creating Lucene k-NN query for index: %s \"\", field: %s \"\", k: %d", indexName, fieldName, k)); | ||
| BitSetProducer parentFilter = createQueryRequest.context == null ? null : createQueryRequest.context.getParentFilter(); |
Collaborator
There was a problem hiding this comment.
who is setting this parent filter in the CreateQueryRequest?
Collaborator
Author
There was a problem hiding this comment.
navneet1v
approved these changes
Oct 10, 2023
Collaborator
|
@heemin32 can we add benchmarks around this feature, what your thought? |
Collaborator
Author
That is a great idea. However, I would like to defer the effort until there is strong needs for the benchmark as we need to construct test data by ourselves for the nested field which might take some amount of efforts. |
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Oct 10, 2023
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit a496926)
heemin32
added a commit
to heemin32/k-NN
that referenced
this pull request
Oct 11, 2023
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit a496926)
heemin32
added a commit
to heemin32/k-NN
that referenced
this pull request
Nov 7, 2023
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit a496926)
heemin32
added a commit
to heemin32/k-NN
that referenced
this pull request
Nov 7, 2023
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit a496926)
heemin32
added a commit
that referenced
this pull request
Nov 7, 2023
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit a496926) Co-authored-by: Heemin Kim <heemin@amazon.com>
jingqimao77-spec
pushed a commit
to jingqimao77-spec/k-NN
that referenced
this pull request
Mar 15, 2026
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result Signed-off-by: Heemin Kim <heemin@amazon.com>
This file contains hidden or 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
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
Call DiversifyingChildren[Byte|Float]KnnVectorQuery for nested field so that k number of parent document can be returned in search result
Issues Resolved
#1065
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.