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_r298725095
 
 

 ##########
 File path: 
solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java
 ##########
 @@ -34,17 +41,37 @@
 /**
  * Implementation for transforming {@link SearchGroup} into a {@link 
NamedList} structure and visa versa.
  */
-public class SearchGroupsResultTransformer implements 
ShardResultTransformer<List<Command>, Map<String, 
SearchGroupsFieldCommandResult>> {
+public abstract class SearchGroupsResultTransformer implements 
ShardResultTransformer<List<Command>, Map<String, 
SearchGroupsFieldCommandResult>> {
 
 Review comment:
   Thanks @diegoceccarelli for applying the serialise-one-group commit and for 
attempting a similar approach for the deserialisation! As you say, now there is 
no duplication though returning to this after a little while it seems to me at 
least a little bit tricky to understand where the boundaries are between the 
refactoring and the changes related to the skip-second-step logic i.e. to see 
that the refactoring does not break anything and to see that and why the 
skip-second-step logic will work as intended. Against that background 
https://issues.apache.org/jira/browse/SOLR-13585 proposes to do a pure 
factoring out of two methods first (albeit with foresight of the envisaged code 
changes here) and then hopefully the skip-second-step logic addition would be 
clearer to see. Admittedly though such a split approach would make for a mildly 
messy rebase for the PR branch here. What do you think?

----------------------------------------------------------------
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