|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Searcher
org.apache.lucene.search.MultiSearcher
org.apache.lucene.search.ParallelMultiSearcher
public class ParallelMultiSearcher
Implements parallel search over a set of Searchables
.
Applications usually need only call the inherited Searcher.search(Query,int)
or Searcher.search(Query,Filter,int)
methods.
Constructor Summary | |
---|---|
ParallelMultiSearcher(Searchable... searchables)
Creates a Searchable which searches searchables. |
Method Summary | |
---|---|
void |
close()
Frees resources associated with this Searcher. |
int |
docFreq(Term term)
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)
Lower-level search API. |
TopDocs |
search(Weight weight,
Filter filter,
int nDocs)
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)
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. |
Methods inherited from class org.apache.lucene.search.MultiSearcher |
---|
createWeight, doc, doc, explain, getSearchables, getStarts, maxDoc, rewrite, subDoc, subSearcher |
Methods inherited from class org.apache.lucene.search.Searcher |
---|
docFreqs, explain, getSimilarity, search, search, search, search, search, setSimilarity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParallelMultiSearcher(Searchable... searchables) throws java.io.IOException
Searchable
which searches searchables.
java.io.IOException
Method Detail |
---|
public int docFreq(Term term) throws java.io.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
java.io.IOException
IndexReader.docFreq(Term)
public TopDocs search(Weight weight, Filter filter, int nDocs) throws java.io.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
java.io.IOException
public TopFieldDocs search(Weight weight, Filter filter, int nDocs, Sort sort) throws java.io.IOException
search
in interface Searchable
search
in class MultiSearcher
java.io.IOException
public void search(Weight weight, Filter filter, Collector collector) throws java.io.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 hits
java.io.IOException
public void close() throws java.io.IOException
Searchable
close
in interface java.io.Closeable
close
in interface Searchable
close
in class MultiSearcher
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |