diegoceccarelli 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_r328753104
########## File path: lucene/grouping/src/java/org/apache/lucene/search/grouping/FirstPassGroupingCollector.java ########## @@ -139,10 +139,18 @@ public ScoreMode scoreMode() { // System.out.println(" group=" + (group.groupValue == null ? "null" : group.groupValue.toString())); SearchGroup<T> searchGroup = new SearchGroup<>(); searchGroup.groupValue = group.groupValue; + // We pass this around so that we can get the corresponding solr id when serializing the search group to send to the federator + searchGroup.topDocLuceneId = group.topDoc; searchGroup.sortValues = new Object[sortFieldCount]; for(int sortFieldIDX=0;sortFieldIDX<sortFieldCount;sortFieldIDX++) { searchGroup.sortValues[sortFieldIDX] = comparators[sortFieldIDX].value(group.comparatorSlot); } + // TODO: It should be possible to extend this to handle more than one FieldComparator and other types Review comment: a5c5e616d3 3e4c9d0 forbid `group.func` (not supported by distribute search anyway) and `group.query` (prefer to do this in a separate moment because I think it will require some time to make sure that it works and test it). I also cover that into the documentation. ---------------------------------------------------------------- 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: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org