Pass parent filter to inner query in nested query#10246
Pass parent filter to inner query in nested query#10246msfroh merged 1 commit intoopensearch-project:mainfrom
Conversation
c8fe10c to
99fccbf
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
99fccbf to
203cf7b
Compare
Compatibility status:Checks if related components are compatible with change 5ea44e6 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git] |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com>
203cf7b to
5ea44e6
Compare
Gradle Check (Jenkins) Run Completed with:
|
msfroh
left a comment
There was a problem hiding this comment.
Looks good to me.
We'll should think about whether other queries may also benefit from specific knowledge of the parent filter.
Right now, I think most normal DocIdSetIterator-based queries get all the benefit from the existing ToParentBlockJoinQuery logic. Correct me if I'm wrong, but kNN only needs this special behavior because it's not iterating through a monotonically-increasing doc ID set, right?
That is correct. Only KNN needs this as of now. |
|
@msfroh Could you back port it to 2.x as well? |
Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com> (cherry picked from commit e156582) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Pass parent filter to inner query so that inner query can utilize the information (cherry picked from commit e156582) Signed-off-by: Heemin Kim <heemin@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#10246) Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com>
…#10246) Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com>
…#10246) Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com>
…#10246) Pass parent filter to inner query so that inner query can utilize the information Signed-off-by: Heemin Kim <heemin@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
Lucene introduced a new feature of joining child and parent document in knn search. apache/lucene#12434
To utilize the feature, we need to pass parent filter to inner query so that inner query can dedupe child document per parent document.
Once this change is made, we can use the parent filter data to call appropriate query in kNN repo. opensearch-project/k-NN#1065
Related Issues
N/A
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.