private int maxDoc() throws IOException { return searcher.maxDoc(); } }
private long innerCount() { try { final int maxDoc = searcher.maxDoc(); if (maxDoc == 0) { return 0; } TotalHitCountCollector collector = new TotalHitCountCollector(); searcher.search(createQuery(), getFilter(), collector); return collector.getTotalHits(); } catch (IOException e) { throw new QueryException(e); } catch (IllegalArgumentException e) { throw new QueryException(e); } }
@Override public int maxDoc() { return searcher.maxDoc(); }
private int maxDoc() throws IOException { return searcher.maxDoc(); } }
private int maxDoc() throws IOException { return searcher.maxDoc(); } }
import org.apache.lucene.document.Document; import org.apache.lucene.search.IndexSearcher; public class Dumper { public static void main(String[] args) throws Exception { IndexSearcher searcher = new IndexSearcher("c:/PROJECTS/Test/index"); for (int i = 0; i < searcher.maxDoc(); i++) { Document doc = searcher.doc(i); String metadata = doc.get("u"); if (metadata != null) { System.out.println(metadata); } } } }
private long innerCount() { try { final int maxDoc = searcher.maxDoc(); if (maxDoc == 0) { return 0; } return searcher.search(createQuery(), filter, maxDoc).totalHits; } catch (IOException e) { throw new QueryException(e); } catch (IllegalArgumentException e) { throw new QueryException(e); } }
final IndexSearcher searcher = searcherManager.acquire(); try { if (searcher.maxDoc() == 0) {
private long innerCount() { try { final int maxDoc = searcher.maxDoc(); if (maxDoc == 0) { return 0; } TotalHitCountCollector collector = new TotalHitCountCollector(); searcher.search(createQuery(), getFilter(), collector); return collector.getTotalHits(); } catch (IOException e) { throw new QueryException(e); } catch (IllegalArgumentException e) { throw new QueryException(e); } }
final List<IndexReader> readers = new ArrayList<IndexReader>(); if (searcher.maxDoc() > 0) { ReaderUtil.gatherSubReaders(readers, searcher.getIndexReader());
final IndexSearcher searcher = searcherManager.acquire(); try { if (searcher.maxDoc() == 0) {