gmarouli commented on code in PR #15727:
URL: https://github.com/apache/lucene/pull/15727#discussion_r2846511902
##########
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:
> We need to return a top-level missing value when a parent has no child
documents with sort values, rather than when it has some missing ones.
I agree and this is what we do for the numeric doc values. But with binary
doc values, we do not have a default value, we only have the flag, if missing
values go first or last, so the missing value ends up missing in the parent too.
This why I approached it like this, if a parent has children with missing
values and the children with a missing value is meant to "win" (this is why we
say check if the sorting is reverse or not and if it's `sortingMissingLast`)
then the parent is treated like it did not having children.
Am I missing some nuance here? (I wouldn't be surprised).
--
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]