org.apache.solr.search
Class SolrConstantScoreQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.ConstantScoreQuery
org.apache.solr.search.SolrConstantScoreQuery
- All Implemented Interfaces:
- Serializable, Cloneable
public class SolrConstantScoreQuery
- extends ConstantScoreQuery
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.
- See Also:
- Serialized Form
SolrConstantScoreQuery
public SolrConstantScoreQuery(Filter filter)
getFilter
public Filter getFilter()
- Returns the encapsulated filter
- Overrides:
getFilter
in class ConstantScoreQuery
rewrite
public Query rewrite(IndexReader reader)
throws IOException
- Overrides:
rewrite
in class ConstantScoreQuery
- Throws:
IOException
extractTerms
public void extractTerms(Set terms)
- Overrides:
extractTerms
in class ConstantScoreQuery
createWeight
public Weight createWeight(Searcher searcher)
- Overrides:
createWeight
in class ConstantScoreQuery
toString
public String toString(String field)
- Prints a user-readable version of this query.
- Overrides:
toString
in class ConstantScoreQuery
equals
public boolean equals(Object o)
- Returns true if
o
is equal to this.
- Overrides:
equals
in class ConstantScoreQuery
hashCode
public int hashCode()
- Returns a hash code value for this object.
- Overrides:
hashCode
in class ConstantScoreQuery
Copyright © 2010 Apache Software Foundation. All Rights Reserved.