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_r272680554
 
 

 ##########
 File path: solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java
 ##########
 @@ -66,5 +66,10 @@
   public static final String GROUP_DISTRIBUTED_SECOND = GROUP + 
".distributed.second";
 
   public static final String GROUP_DISTRIBUTED_TOPGROUPS_PREFIX = GROUP + 
".topgroups.";
+
+  /** activates optimization in case only one document per group.
+   * Setting this to true is only compatible with group.limit = 1
+   */
+  public static final String GROUP_SKIP_DISTRIBUTED_SECOND = GROUP + 
".skip.second.step";
 
 Review comment:
   How about using this `GROUP_SKIP_DISTRIBUTED_SECOND` constant more widely 
throughout the code e.g. when logging and in tests? 
https://github.com/cpoerschke/lucene-solr/commit/6bdf8723564a584dd060f32925beb3bcba68c4ad
 commit sketches how it might be done. This could help code readers locate code 
related to the optimisation.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to