| Method from org.apache.lucene.search.spans.SpanTermQuery Detail: |
public boolean equals(Object o) {
if (!(o instanceof SpanTermQuery))
return false;
SpanTermQuery other = (SpanTermQuery)o;
return (this.getBoost() == other.getBoost())
&& this.term.equals(other.term);
}
Returns true iff o is equal to this. |
public void extractTerms(Set terms) {
terms.add(term);
}
|
public String getField() {
return term.field();
}
|
public Spans getSpans(IndexReader reader) throws IOException {
return new TermSpans(reader.termPositions(term), term);
}
|
public Term getTerm() {
return term;
}
Return the term whose spans are matched. |
public Collection getTerms() {
Collection terms = new ArrayList();
terms.add(term);
return terms;
} Deprecated! use - extractTerms instead
Returns a collection of all terms matched by this query. |
public int hashCode() {
return Float.floatToIntBits(getBoost()) ^ term.hashCode() ^ 0xD23FE494;
}
Returns a hash code value for this object. |
public String toString(String field) {
StringBuffer buffer = new StringBuffer();
if (term.field().equals(field))
buffer.append(term.text());
else
buffer.append(term.toString());
buffer.append(ToStringUtils.boost(getBoost()));
return buffer.toString();
}
|