cpoerschke commented on a change in pull request #300: SOLR-11831: Skip second 
grouping step if group.limit is 1 (aka Las Vegas Patch)
URL: https://github.com/apache/lucene-solr/pull/300#discussion_r321742912
 
 

 ##########
 File path: solr/core/src/test/org/apache/solr/TestDistributedGrouping.java
 ##########
 @@ -425,6 +426,65 @@ public void test() throws Exception {
     
     //Debug
     simpleQuery("q", "*:*", "rows", 10, "fl", "id," + i1, "group", "true", 
"group.field", i1, "debug", "true");
+    doTestGroupSkipSecondStep();
+  }
+
+  /*
+    SOLR-11831, test skipping the second grouping step if the query only 
retrieves on document per group
+   */
+  private void doTestGroupSkipSecondStep() throws Exception {
+    ignoreException(GroupParams.GROUP_SKIP_DISTRIBUTED_SECOND); // don't print 
stack trace for exception raised by group.skip.second.step
+    // Ignore numFound if group.skip.second.step is enabled because the number 
of documents per group will not be computed (will default to 1)
 
 Review comment:
   > ... // Ignore numFound if group.skip.second.step is enabled because the 
number of documents per group will not be computed (will default to 1) ...
   
   Curiosity only at this point, might it be possible to (somehow) test for the 
`numFound` being returned to be `1`
   
   And as you already mentioned elsewhere in this pull request, the `numFound` 
always being `1` for `group.skip.second.step=true` needs to be clearly 
documented.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to