|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.lucene.search.Searcher
The abstract base class for search implementations.
Subclasses implement search over a single index, over multiple indices, and over indices on remote servers.
Constructor Summary | |
Searcher()
|
Method Summary | |
abstract void |
close()
Frees resources associated with this Searcher. |
abstract Document |
doc(int i)
For use by HitCollector implementations. |
Hits |
search(Query query)
Returns the documents matching query . |
Hits |
search(Query query,
Filter filter)
Returns the documents matching query and
filter . |
abstract void |
search(Query query,
Filter filter,
HitCollector results)
Lower-level search API. |
void |
search(Query query,
HitCollector results)
Lower-level search API. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Searcher()
Method Detail |
public final Hits search(Query query) throws IOException
query
.public Hits search(Query query, Filter filter) throws IOException
query
and
filter
.public void search(Query query, 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 (search(Query)
) is usually more efficient, as it skips
non-high-scoring hits.
public abstract 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 (search(Query)
) is usually more efficient, as it skips
non-high-scoring hits.
query
- to match documentsfilter
- if non-null, a bitset used to eliminate some documentsresults
- to receive hitspublic abstract void close() throws IOException
public abstract Document doc(int i) throws IOException
HitCollector
implementations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |