Github user moshebla commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/416#discussion_r211505124
--- Diff:
solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformerHierarchy.java
---
@@ -264,7 +309,7 @@ private static Object cleanIndexableField(Object field)
{
}
private static String grandChildDocTemplate(int id) {
- int docNum = id / 8; // the index of docs sent to solr in the
AddUpdateCommand. e.g. first doc is 0
+ int docNum = (id / sumOfDocsPerNestedDocument) %
numberOfDocsPerNestedTest; // the index of docs sent to solr in the
AddUpdateCommand. e.g. first doc is 0
--- End diff --
the modulo is added to filter the docs in the other segments, and then
calculate the i that was passed, when constructing the nested document. This
then ensures the child transformer did not fail. If we can be satisfied by only
testing the ids, which does not seem as bullet-proof to me, this could be
removed, and only the ids will be tested.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]