Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/416#discussion_r210274031 --- Diff: solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformer.java --- @@ -224,9 +225,29 @@ private static String getPathByDocId(int segDocId, SortedDocValues segPathDocVal return segPathDocValues.binaryValue().utf8ToString(); } - private static String getSolrFieldString(Object fieldVal, FieldType fieldType) { - return fieldVal instanceof IndexableField - ? fieldType.toExternal((IndexableField)fieldVal) - : fieldVal.toString(); + /** + * + * @param segDocBaseId base docID of the segment + * @param RootId docID if the current root document + * @param lastDescendantId lowest docID of the root document's descendant + * @return the docID to loop and to not surpass limit of descendants to match specified by query + */ + private int calcLimitIndex(int segDocBaseId, int RootId, int lastDescendantId) { + int i = segDocBaseId + RootId - 1; // the child document with the highest docID --- End diff -- I strongly suggest avoiding 'i' as a variable name unless it's a loop index
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org