-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[BlockJoin] Add ParentsChildrenBlockJoinQuery to support parent and c… #14728
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
Conversation
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog-check label to it and you will stop receiving this reminder on future updates to the PR. |
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog-check label to it and you will stop receiving this reminder on future updates to the PR. |
lucene/join/src/test/org/apache/lucene/search/join/TestParentsChildrenBlockJoinQuery.java
Outdated
Show resolved
Hide resolved
lucene/join/src/test/org/apache/lucene/search/join/TestParentsChildrenBlockJoinQuery.java
Outdated
Show resolved
Hide resolved
lucene/join/src/test/org/apache/lucene/search/join/TestParentsChildrenBlockJoinQuery.java
Outdated
Show resolved
Hide resolved
lucene/join/src/java/org/apache/lucene/search/join/ParentsChildrenBlockJoinQuery.java
Outdated
Show resolved
Hide resolved
03117a9
to
edbd182
Compare
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog-check label to it and you will stop receiving this reminder on future updates to the PR. |
…hild docs filtering in one pass
edbd182
to
5132163
Compare
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR. |
lucene/join/src/java/org/apache/lucene/search/join/ParentsChildrenBlockJoinQuery.java
Show resolved
Hide resolved
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR. |
@mkhludnev -- you had some comments on the linked issue. Does this approach seem reasonable to you? If so, I'll go ahead and merge it. Also, we can safely backport this to 10.x. @Jinny-Wang, could you please move the changelog entry to 10.3.0? Thanks! |
@msfroh I still think extending the existing ToChildBlockJoinQuery with this functionality is preferable, at least from a code maintenance standpoint. However, I can't contribute much to this work now, or anytime soon. |
#14565
Problem
The current block join query family doesn't support filtering on both parent docs and child docs at the same time while applying a childLimitPerParent.
To do that we either need to use a ToChildBlockJoinQuery combined with another childQuery.
Or use ToParentBlockJoinQuery combined with ParentChildrenBlockJoinQuery (which only takes 1 parent doc id).
More detailed examples and description in #14565
Solution
Introduce a new
ParentsChildrenBlockJoinQuery
so that it supports one pass scanning on both parent and child docs , applying filter to both parent and child at the same time while supporting a child limit per parent.