Java 类org.apache.lucene.search.grouping.function.FunctionAllGroupsCollector 实例源码

项目:search    文件:TestGrouping.java   
private AbstractAllGroupsCollector<?> createAllGroupsCollector(AbstractFirstPassGroupingCollector<?> firstPassGroupingCollector,
                                                            String groupField) {
  if (firstPassGroupingCollector.getClass().isAssignableFrom(TermFirstPassGroupingCollector.class)) {
    return new TermAllGroupsCollector(groupField);
  } else {
    ValueSource vs = new BytesRefFieldSource(groupField);
    return new FunctionAllGroupsCollector(vs, new HashMap<>());
  }
}
项目:NYBC    文件:TestGrouping.java   
private AbstractAllGroupsCollector<?> createAllGroupsCollector(AbstractFirstPassGroupingCollector<?> firstPassGroupingCollector,
                                                            String groupField) {
  if (firstPassGroupingCollector.getClass().isAssignableFrom(TermFirstPassGroupingCollector.class)) {
    return new TermAllGroupsCollector(groupField);
  } else {
    ValueSource vs = new BytesRefFieldSource(groupField);
    return new FunctionAllGroupsCollector(vs, new HashMap<Object, Object>());
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestGrouping.java   
private AbstractAllGroupsCollector<?> createAllGroupsCollector(AbstractFirstPassGroupingCollector<?> firstPassGroupingCollector,
                                                            String groupField) {
  if (firstPassGroupingCollector.getClass().isAssignableFrom(TermFirstPassGroupingCollector.class)) {
    return new TermAllGroupsCollector(groupField);
  } else {
    ValueSource vs = new BytesRefFieldSource(groupField);
    return new FunctionAllGroupsCollector(vs, new HashMap<Object, Object>());
  }
}