Methods Summary |
---|
protected org.apache.lucene.search.Weight | createWeight(org.apache.lucene.search.Searcher searcher)
return new ConstantScoreQuery.ConstantWeight(searcher);
|
public boolean | equals(java.lang.Object o)Returns true if o is equal to this.
if (this == o) return true;
if (!(o instanceof ConstantScoreQuery)) return false;
ConstantScoreQuery other = (ConstantScoreQuery)o;
return this.getBoost()==other.getBoost() && filter.equals(other.filter);
|
public int | hashCode()Returns a hash code value for this object.
// Simple add is OK since no existing filter hashcode has a float component.
return filter.hashCode() + Float.floatToIntBits(getBoost());
|
public org.apache.lucene.search.Query | rewrite(org.apache.lucene.index.IndexReader reader)
return this;
|
public java.lang.String | toString(java.lang.String field)Prints a user-readable version of this query.
return "ConstantScore(" + filter.toString()
+ (getBoost()==1.0 ? ")" : "^" + getBoost());
|