|
|||||||||
| 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
org.apache.solr.search.SolrConstantScoreQuery
public class SolrConstantScoreQuery
A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter. This Solr extension also supports weighting of a SolrFilter. Experimental and subject to change.
| Nested Class Summary | |
|---|---|
protected class |
SolrConstantScoreQuery.ConstantScorer
|
protected class |
SolrConstantScoreQuery.ConstantWeight
|
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.search.ConstantScoreQuery |
|---|
filter, query |
| Constructor Summary | |
|---|---|
SolrConstantScoreQuery(Filter filter)
|
|
| Method Summary | |
|---|---|
Weight |
createWeight(IndexSearcher searcher)
|
boolean |
equals(Object o)
Returns true if o is equal to this. |
void |
extractTerms(Set terms)
|
boolean |
getCache()
Should this query be cached in the query cache or filter cache. |
boolean |
getCacheSep()
If true, the clauses of this boolean query should be cached separately. |
int |
getCost()
Returns the cost of this query, used to order checking of filters that are not cached. |
Filter |
getFilter()
Returns the encapsulated filter |
int |
hashCode()
Returns a hash code value for this object. |
Query |
rewrite(IndexReader reader)
|
void |
setCache(boolean cache)
|
void |
setCacheSep(boolean cacheSep)
|
void |
setCost(int cost)
|
String |
toString(String field)
Prints a user-readable version of this query. |
| Methods inherited from class org.apache.lucene.search.ConstantScoreQuery |
|---|
getQuery |
| Methods inherited from class org.apache.lucene.search.Query |
|---|
clone, getBoost, setBoost, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SolrConstantScoreQuery(Filter filter)
| Method Detail |
|---|
public Filter getFilter()
getFilter in class ConstantScoreQuerypublic void setCache(boolean cache)
setCache in interface ExtendedQuerypublic boolean getCache()
ExtendedQuery
getCache in interface ExtendedQuerypublic void setCacheSep(boolean cacheSep)
setCacheSep in interface ExtendedQuerypublic boolean getCacheSep()
ExtendedQuery
getCacheSep in interface ExtendedQuerypublic void setCost(int cost)
setCost in interface ExtendedQuerypublic int getCost()
ExtendedQuery
getCost in interface ExtendedQuery
public Query rewrite(IndexReader reader)
throws IOException
rewrite in class ConstantScoreQueryIOExceptionpublic void extractTerms(Set terms)
extractTerms in class ConstantScoreQuerypublic Weight createWeight(IndexSearcher searcher)
createWeight in class ConstantScoreQuerypublic String toString(String field)
toString in class ConstantScoreQuerypublic boolean equals(Object o)
o is equal to this.
equals in class ConstantScoreQuerypublic int hashCode()
hashCode in class ConstantScoreQuery
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||