Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r213292329
--- Diff:
solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformer.java
---
@@ -109,9 +109,14 @@ public void transform(SolrDocument rootDoc, int
rootDocId) {
// Loop each child ID up to the parent (exclusive).
for (int docId = calcDocIdToIterateFrom(lastChildId, rootDocId);
docId < rootDocId; ++docId) {
- // get the path. (note will default to ANON_CHILD_KEY if not in
schema or oddly blank)
+ // get the path. (note will default to ANON_CHILD_KEY if schema
is not nested or empty string if blank)
String fullDocPath = getPathByDocId(docId - segBaseId,
segPathDocValues);
+ if(isNestedSchema && !fullDocPath.contains(transformedDocPath)) {
+ // is not a descendant of the transformed doc, return fast.
+ return;
--- End diff --
woah; shouldn't this be "continue"? We should have a test that would fail
on this bug. All it would take would be an additional child doc that is not
underneath the input root/transformed doc but follows it (as provided on
input). Some of the first docs we iterate over here might not descend from
rootDocId
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]