|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Searcher
An abstract base class for search implementations. Implements some common utility methods.
Constructor Summary | |
Searcher()
|
Method Summary | |
Similarity |
getSimilarity()
Expert: Return the Similarity implementation used by this Searcher. |
Hits |
search(Query query)
Returns the documents matching query . |
Hits |
search(Query query,
Filter filter)
Returns the documents matching query and
filter . |
void |
search(Query query,
HitCollector results)
Lower-level search API. |
void |
setSimilarity(Similarity similarity)
Expert: Set the Similarity implementation used by this Searcher. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.lucene.search.Searchable |
close, doc, docFreq, explain, maxDoc, rewrite, search, search |
Constructor Detail |
public Searcher()
Method Detail |
public final Hits search(Query query) throws IOException
query
.
IOException
public Hits search(Query query, Filter filter) throws IOException
query
and
filter
.
IOException
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.
Note: The score
passed to this method is a raw score.
In other words, the score will not necessarily be a float whose value is
between 0 and 1.
IOException
public void setSimilarity(Similarity similarity)
Similarity.setDefault(Similarity)
public Similarity getSimilarity()
This defaults to the current value of Similarity.getDefault()
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |