gmarouli commented on code in PR #15727:
URL: https://github.com/apache/lucene/pull/15727#discussion_r2847302036
##########
lucene/join/src/java/org/apache/lucene/search/join/ToParentDocValues.java:
##########
@@ -242,6 +296,23 @@ public int advance(int target) throws IOException {
return nextDoc();
}
+ /**
+ * Advance the iterator to exactly {@code targetParentDocID} and return
whether it has a value
+ * derived from its child documents. {@code targetParentDocID} must be
greater than or equal to
+ * the current {@link #docID() doc ID}. After this method returns, {@link
#docID()} returns {@code
+ * targetParentDocID}.
+ *
+ * <p>A parent document is considered to have a value when at least one of
its child documents has
+ * a value. When {@code skipParentsWithMissingChildValues} is {@code true},
the parent is
Review Comment:
I see, so we could use the same approach based on the child
`sortMissingLast`. If parent and child have different `reverse` or
`sortMissingLast` will be able to differentiate between a parent without
children and a parent with a child with a missing value.
Thank you! This was very helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]