IndexSearcher
, instead.@Deprecated public class ParallelMultiSearcher extends MultiSearcher
Searchables
.
Applications usually need only call the inherited Searcher.search(Query,int)
or Searcher.search(Query,Filter,int)
methods.
Constructor and Description |
---|
ParallelMultiSearcher(ExecutorService executor,
Searchable... searchables)
Deprecated.
Creates a
Searchable which searches searchables with the specified ExecutorService. |
ParallelMultiSearcher(Searchable... searchables)
Deprecated.
Creates a
Searchable which searches searchables with the default
executor service (a cached thread pool). |
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Frees resources associated with this Searcher.
|
int |
docFreq(Term term)
Deprecated.
Executes each
Searchable 's docFreq() in its own thread and waits for each search to complete and merge
the results back together. |
void |
search(Weight weight,
Filter filter,
Collector collector)
Deprecated.
Lower-level search API.
|
TopDocs |
search(Weight weight,
Filter filter,
int nDocs)
Deprecated.
A search implementation which executes each
Searchable in its own thread and waits for each search to complete and merge
the results back together. |
TopFieldDocs |
search(Weight weight,
Filter filter,
int nDocs,
Sort sort)
Deprecated.
A search implementation allowing sorting which spans a new thread for each
Searchable, waits for each search to complete and merges
the results back together.
|
createNormalizedWeight, doc, doc, explain, getSearchables, getStarts, maxDoc, rewrite, subDoc, subSearcher
createWeight, docFreqs, explain, getSimilarity, search, search, search, search, search, search, setSimilarity
public ParallelMultiSearcher(Searchable... searchables) throws IOException
Searchable
which searches searchables with the default
executor service (a cached thread pool).IOException
public ParallelMultiSearcher(ExecutorService executor, Searchable... searchables) throws IOException
Searchable
which searches searchables with the specified ExecutorService.IOException
public int docFreq(Term term) throws IOException
Searchable
's docFreq() in its own thread and waits for each search to complete and merge
the results back together.docFreq
in interface Searchable
docFreq
in class MultiSearcher
IOException
IndexReader.docFreq(Term)
public TopDocs search(Weight weight, Filter filter, int nDocs) throws IOException
Searchable
in its own thread and waits for each search to complete and merge
the results back together.search
in interface Searchable
search
in class MultiSearcher
IOException
public TopFieldDocs search(Weight weight, Filter filter, int nDocs, Sort sort) throws IOException
search
in interface Searchable
search
in class MultiSearcher
IOException
public void search(Weight weight, Filter filter, Collector collector) throws IOException
Collector.collect(int)
is called for every matching document.
Applications should only use this if they need all of the
matching documents. The high-level search API (Searcher.search(Query,int)
) is usually more efficient, as it skips
non-high-scoring hits.
This method cannot be parallelized, because Collector
supports no concurrent access.
search
in interface Searchable
search
in class MultiSearcher
weight
- to match documentsfilter
- if non-null, a bitset used to eliminate some documentscollector
- to receive hitsIOException
public void close() throws IOException
Searchable
close
in interface Closeable
close
in interface Searchable
close
in class MultiSearcher
IOException