public class SolrConstantScoreQuery extends Query implements ExtendedQuery
Modifier and Type | Class and Description |
---|---|
protected class |
SolrConstantScoreQuery.ConstantWeight |
Constructor and Description |
---|
SolrConstantScoreQuery(Filter filter) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object other)
Returns true if
o is equal to this. |
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.
|
void |
setCache(boolean cache) |
void |
setCacheSep(boolean cacheSep) |
void |
setCost(int cost) |
String |
toString(String field)
Prints a user-readable version of this query.
|
classHash, rewrite, sameClassAs, toString
public SolrConstantScoreQuery(Filter filter)
public void setCache(boolean cache)
setCache
in interface ExtendedQuery
public boolean getCache()
ExtendedQuery
getCache
in interface ExtendedQuery
public void setCacheSep(boolean cacheSep)
setCacheSep
in interface ExtendedQuery
public boolean getCacheSep()
ExtendedQuery
getCacheSep
in interface ExtendedQuery
public void setCost(int cost)
setCost
in interface ExtendedQuery
public int getCost()
ExtendedQuery
getCost
in interface ExtendedQuery
public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
needsScores
- True if document scores (Scorer.score()
) or match
frequencies (Scorer.freq()
) are needed.IOException
public boolean equals(Object other)
o
is equal to this.equals
in class Query
Query.sameClassAs(Object)
,
Query.classHash()
public int hashCode()
hashCode
in class Query
Query.equals(Object)