use of org.apache.metron.indexing.dao.search.GroupResult in project metron by apache.
the class InMemoryDao method getGroupResults.
private List<GroupResult> getGroupResults(List<Group> groups, int index) {
Group group = groups.get(index);
GroupResult groupResult = new GroupResult();
groupResult.setKey(group.getField() + "_value");
if (index < groups.size() - 1) {
groupResult.setGroupedBy(groups.get(index + 1).getField());
groupResult.setGroupResults(getGroupResults(groups, index + 1));
} else {
groupResult.setScore(50.0);
}
groupResult.setTotal(10);
return Collections.singletonList(groupResult);
}
Aggregations