if (!rb.searchGroupToShard.containsKey(field)) {
rb.searchGroupToShard.put(field, new HashMap<SearchGroup<String>, String>());
}
}
SearchGroupsResultTransformer serializer = new SearchGroupsResultTransformer(rb.req.getSearcher());
try {
for (ShardResponse srsp : shardRequest.responses) {
@SuppressWarnings("unchecked")
NamedList<NamedList> firstPhaseResult = (NamedList<NamedList>) srsp.getSolrResponse().getResponse().get("firstPhase");
Map<String, Collection<SearchGroup<String>>> result = serializer.transformToNative(firstPhaseResult, groupSort, null, srsp.getShard());
for (String field : commandSearchGroups.keySet()) {
Collection<SearchGroup<String>> searchGroups = result.get(field);
if (searchGroups == null) {
continue;
}