@Override public List<SolrDocument> getResponseDocuments(QueryResponse response) { List<SolrDocument> docs; if (response.getGroupResponse() == null) { docs = response.getResults(); } else { docs = new ArrayList<SolrDocument>(); GroupResponse gr = response.getGroupResponse(); for (GroupCommand gc : gr.getValues()) { for (Group g : gc.getValues()) { for (SolrDocument d : g.getResult()) { docs.add(d); } } } } return docs; }
GroupCommand groupCommand = groupCommands.get(0); List<Group> groups = groupCommand.getValues();
@Override public void accept(GroupCommand comm) { if (groupingField != null && !groupingField.equals(comm.getName())) return; List<Group> groups = comm.getValues(); if (groups != null) { for (Group group : groups) { results.put(group.getGroupValue(), group.getResult()); } } } };
@Override public void accept(GroupCommand comm) { if (groupingField != null && !groupingField.equals(comm.getName())) return; List<Group> groups = comm.getValues(); if (groups != null) { for (Group group : groups) { Consumer<SolrDocument> consumer = consumers.get(group.getGroupValue()); if (consumer != null) group.getResult().forEach(consumer); } } } };
List<Group> groups = groupCommand.getValues();
.stream() .filter(g -> g.getName().equals(visitor.getExpression().toString())) .flatMap(gr -> gr.getValues().stream()) .map(g -> g.getGroupValue()) .collect(Collectors.toList());
for (Group group : groupCommand.getValues()) {
for (GroupCommand gCommand : gResponse.getValues()) { total += gCommand.getNGroups(); for (Group group : gCommand.getValues()) { docs.addAll(server.getBinder().getBeans(Document.class, group.getResult()));