Methods Summary |
---|
protected org.apache.lucene.search.Weight | createWeight(org.apache.lucene.search.Searcher searcher)
return new TermWeight(searcher);
|
public boolean | equals(java.lang.Object o)Returns true iff o is equal to this.
if (!(o instanceof TermQuery))
return false;
TermQuery other = (TermQuery)o;
return (this.getBoost() == other.getBoost())
&& this.term.equals(other.term);
|
public void | extractTerms(java.util.Set terms)
terms.add(getTerm());
|
public org.apache.lucene.index.Term | getTerm()Returns the term of this query. return term;
|
public int | hashCode()Returns a hash code value for this object.
return Float.floatToIntBits(getBoost()) ^ term.hashCode();
|
public java.lang.String | toString(java.lang.String field)Prints a user-readable version of this query.
StringBuffer buffer = new StringBuffer();
if (!term.field().equals(field)) {
buffer.append(term.field());
buffer.append(":");
}
buffer.append(term.text());
buffer.append(ToStringUtils.boost(getBoost()));
return buffer.toString();
|