Package org.apache.lucene.search

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

Related Classes of org.apache.lucene.search.TotalHitCountCollector

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.