SOLR-10659: Remove ResponseBuilder.getSortSpec use in SearchGroupShardResponseProcessor. (Judith Silverman via Christine Poerschke)

This commit is contained in:
Christine Poerschke 2017-05-25 14:10:55 +01:00
parent 2bb6e2caca
commit 6ba1834bc3
2 changed files with 5 additions and 2 deletions

View File

@ -256,6 +256,9 @@ Other Changes
* SOLR-10438: Assign explicit useDocValuesAsStored values to all points field types in * SOLR-10438: Assign explicit useDocValuesAsStored values to all points field types in
schema-point.xml/TestPointFields. (hossman, Steve Rowe) schema-point.xml/TestPointFields. (hossman, Steve Rowe)
* SOLR-10659: Remove ResponseBuilder.getSortSpec use in SearchGroupShardResponseProcessor.
(Judith Silverman via Christine Poerschke)
================== 6.6.0 ================== ================== 6.6.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -52,7 +52,7 @@ public class SearchGroupShardResponseProcessor implements ShardResponseProcessor
*/ */
@Override @Override
public void process(ResponseBuilder rb, ShardRequest shardRequest) { public void process(ResponseBuilder rb, ShardRequest shardRequest) {
SortSpec ss = rb.getSortSpec(); SortSpec groupSortSpec = rb.getGroupingSpec().getGroupSortSpec();
Sort groupSort = rb.getGroupingSpec().getGroupSort(); Sort groupSort = rb.getGroupingSpec().getGroupSort();
final String[] fields = rb.getGroupingSpec().getFields(); final String[] fields = rb.getGroupingSpec().getFields();
Sort withinGroupSort = rb.getGroupingSpec().getSortWithinGroup(); Sort withinGroupSort = rb.getGroupingSpec().getSortWithinGroup();
@ -144,7 +144,7 @@ public class SearchGroupShardResponseProcessor implements ShardResponseProcessor
rb.firstPhaseElapsedTime = maxElapsedTime; rb.firstPhaseElapsedTime = maxElapsedTime;
for (String groupField : commandSearchGroups.keySet()) { for (String groupField : commandSearchGroups.keySet()) {
List<Collection<SearchGroup<BytesRef>>> topGroups = commandSearchGroups.get(groupField); List<Collection<SearchGroup<BytesRef>>> topGroups = commandSearchGroups.get(groupField);
Collection<SearchGroup<BytesRef>> mergedTopGroups = SearchGroup.merge(topGroups, ss.getOffset(), ss.getCount(), groupSort); Collection<SearchGroup<BytesRef>> mergedTopGroups = SearchGroup.merge(topGroups, groupSortSpec.getOffset(), groupSortSpec.getCount(), groupSort);
if (mergedTopGroups == null) { if (mergedTopGroups == null) {
continue; continue;
} }