Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r213295374
--- Diff:
solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformer.java
---
@@ -99,6 +96,9 @@ public void transform(SolrDocument rootDoc, int
rootDocId) {
// we'll need this soon...
final SortedDocValues segPathDocValues =
DocValues.getSorted(leafReaderContext.reader(), NEST_PATH_FIELD_NAME);
+ // passing a different SortedDocValues obj since the child documents
which come after are of smaller docIDs,
+ // and the iterator can not be reversed.
+ final String transformedDocPath = getPathByDocId(segRootId,
DocValues.getSorted(leafReaderContext.reader(), NEST_PATH_FIELD_NAME));
--- End diff --
Can you call this rootDocPath since we refer to this doc as the "root doc"
elsewhere here? I can see why you chose this name. You could add a comment
that the "root doc" is the input doc we are adding information to, and is
usually but not necessarily the root of the block of documents (i.e. the root
doc may itself be a child doc of another doc).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]