|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.Query
org.apache.lucene.search.ConstantScoreQuery
public class ConstantScoreQuery
A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.
| Nested Class Summary | |
|---|---|
protected class |
ConstantScoreQuery.ConstantScorer
|
protected class |
ConstantScoreQuery.ConstantWeight
|
| Field Summary | |
|---|---|
protected Filter |
filter
|
| Constructor Summary | |
|---|---|
ConstantScoreQuery(Filter filter)
|
|
| Method Summary | |
|---|---|
protected Weight |
createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query. |
boolean |
equals(Object o)
Returns true if o is equal to this. |
void |
extractTerms(Set terms)
Expert: adds all terms occuring in this query to the terms set. |
Filter |
getFilter()
Returns the encapsulated filter |
int |
hashCode()
Returns a hash code value for this object. |
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries. |
String |
toString(String field)
Prints a user-readable version of this query. |
| Methods inherited from class org.apache.lucene.search.Query |
|---|
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Filter filter
| Constructor Detail |
|---|
public ConstantScoreQuery(Filter filter)
| Method Detail |
|---|
public Filter getFilter()
public Query rewrite(IndexReader reader)
throws IOException
Query
rewrite in class QueryIOExceptionpublic void extractTerms(Set terms)
Queryrewritten form.
extractTerms in class Queryprotected Weight createWeight(Searcher searcher)
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class Querypublic String toString(String field)
toString in class Querypublic boolean equals(Object o)
o is equal to this.
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||