|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.lucene.search.Searcher | +--org.apache.lucene.search.IndexSearcher
Implements search over a single IndexReader.
Constructor Summary | |
IndexSearcher(Directory directory)
Creates a searcher searching the index in the provided directory. |
|
IndexSearcher(IndexReader r)
Creates a searcher searching the provided index. |
|
IndexSearcher(String path)
Creates a searcher searching the index in the named directory. |
Method Summary | |
void |
close()
Frees resources associated with this Searcher. |
Document |
doc(int i)
For use by HitCollector implementations. |
void |
search(Query query,
Filter filter,
HitCollector results)
Lower-level search API. |
Methods inherited from class org.apache.lucene.search.Searcher |
search, search, search |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IndexSearcher(String path) throws IOException
public IndexSearcher(Directory directory) throws IOException
public IndexSearcher(IndexReader r)
Method Detail |
public final void close() throws IOException
close
in class Searcher
public final Document doc(int i) throws IOException
HitCollector
implementations.doc
in class Searcher
public final void search(Query query, Filter filter, HitCollector results) throws IOException
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 (Searcher.search(Query)
) is usually more efficient, as it skips
non-high-scoring hits.
search
in class Searcher
query
- to match documentsfilter
- if non-null, a bitset used to eliminate some documentsresults
- to receive hits
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |