Github user moshebla commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/416#discussion_r210287119
  
    --- Diff: 
solr/core/src/test/org/apache/solr/response/transform/TestChildDocTransformer.java
 ---
    @@ -81,8 +81,8 @@ private void testChildDoctransformerXML() {
     
         String test3[] = new String[] {
             "//*[@numFound='1']",
    -        "/response/result/doc[1]/doc[1]/str[@name='id']='3'" ,
    -        "/response/result/doc[1]/doc[2]/str[@name='id']='5'" };
    +        "/response/result/doc[1]/doc[1]/str[@name='id']='5'" ,
    --- End diff --
    
    since we initialize the document using from the highest index to exhaust 
the limit if possible, it means some documents may be skipped. If we have 3 
child docs: 1 , 2, 3, and the limit is set to "2", only doc 2 and 3 will be 
added if we initialise the index to the one that will exhaust the limit. 
Another way is simply to count the number of matching docs so far, and continue 
onto the next root doc if reached(return from the transform method).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to