Methods Summary |
---|
public boolean | equals(java.lang.Object o)Returns true iff o is equal to this.
if (!(o instanceof SpanTermQuery))
return false;
SpanTermQuery other = (SpanTermQuery)o;
return (this.getBoost() == other.getBoost())
&& this.term.equals(other.term);
|
public void | extractTerms(java.util.Set terms)
terms.add(term);
|
public java.lang.String | getField() return term.field();
|
public org.apache.lucene.search.spans.Spans | getSpans(org.apache.lucene.index.IndexReader reader)
return new TermSpans(reader.termPositions(term), term);
|
public org.apache.lucene.index.Term | getTerm()Return the term whose spans are matched. return term;
|
public java.util.Collection | getTerms()Returns a collection of all terms matched by this query.
Collection terms = new ArrayList();
terms.add(term);
return terms;
|
public int | hashCode()Returns a hash code value for this object.
return Float.floatToIntBits(getBoost()) ^ term.hashCode() ^ 0xD23FE494;
|
public java.lang.String | toString(java.lang.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();
|