org.apache.lucene.search
public class ParallelMultiSearcher extends MultiSearcher
Searchables
.
Applications usually need only call the inherited {@link #search(Query)} or {@link #search(Query,Filter)} methods.
Constructor Summary | |
---|---|
ParallelMultiSearcher(Searchable[] searchables) Creates a searcher which searches searchables. |
Method Summary | |
---|---|
int | docFreq(Term term)
TODO: parallelize this one too |
Query | rewrite(Query original) |
TopDocs | search(Query query, Filter filter, int nDocs)
A search implementation which spans a new thread for each
Searchable, waits for each search to complete and merge
the results back together. |
TopFieldDocs | search(Query query, Filter filter, int nDocs, Sort sort)
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. |
void | search(Query query, Filter filter, HitCollector results) Lower-level search API.
|
{@link HitCollector#collect(int,float)} is called for every non-zero scoring document.
Applications should only use this if they need all of the matching documents. The high-level search API ({@link Searcher#search(Query)}) is usually more efficient, as it skips non-high-scoring hits.
Parameters: query to match documents filter if non-null, a bitset used to eliminate some documents results to receive hits TODO: parallelize this one too