Methods Summary |
---|
public org.apache.lucene.search.Similarity | getSimilarity()Expert: Return the Similarity implementation used by this Searcher.
This defaults to the current value of {@link Similarity#getDefault()}.
return this.similarity;
|
public final org.apache.lucene.search.Hits | search(org.apache.lucene.search.Query query)Returns the documents matching query .
return search(query, (Filter)null);
|
public org.apache.lucene.search.Hits | search(org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter)Returns the documents matching query and
filter .
return new Hits(this, query, filter);
|
public org.apache.lucene.search.Hits | search(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort sort)Returns documents matching query sorted by
sort .
return new Hits(this, query, null, sort);
|
public org.apache.lucene.search.Hits | search(org.apache.lucene.search.Query query, org.apache.lucene.search.Filter filter, org.apache.lucene.search.Sort sort)Returns documents matching query and filter ,
sorted by sort .
return new Hits(this, query, filter, sort);
|
public void | search(org.apache.lucene.search.Query query, org.apache.lucene.search.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.
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.
search(query, (Filter)null, results);
|
public void | setSimilarity(org.apache.lucene.search.Similarity similarity)Expert: Set the Similarity implementation used by this Searcher.
this.similarity = similarity;
|