Package org.apache.lucene.search.grouping

Examples of org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector$TemporalResult


    }
  }

  private DocSet computeGroupedDocSet(Query query, Filter luceneFilter, List<Collector> collectors) throws IOException {
    Command firstCommand = commands.get(0);
    AbstractAllGroupHeadsCollector termAllGroupHeadsCollector =
        TermAllGroupHeadsCollector.create(firstCommand.getKey(), firstCommand.getSortWithinGroup());
    if (collectors.isEmpty()) {
      searcher.search(query, luceneFilter, termAllGroupHeadsCollector);
    } else {
      collectors.add(termAllGroupHeadsCollector);
      searcher.search(query, luceneFilter, MultiCollector.wrap(collectors.toArray(new Collector[collectors.size()])));
    }

    int maxDoc = searcher.maxDoc();
    long[] bits = termAllGroupHeadsCollector.retrieveGroupHeads(maxDoc).getBits();
    return new BitDocSet(new OpenBitSet(bits, bits.length));
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector$TemporalResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.