Examples of TotalHitCountCollector


Examples of org.apache.lucene.search.TotalHitCountCollector

public abstract class LuceneIndexCountHitsRecordReader
    extends LuceneIndexRecordReader<IntWritable> {

  @Override
  protected Iterator<IntWritable> search(IndexSearcher searcher, Query query) throws IOException {
    TotalHitCountCollector collector = new TotalHitCountCollector();
    searcher.search(query, collector);
    return ImmutableList.of(new IntWritable(collector.getTotalHits())).iterator();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.