org.apache.lucene.search.spans

Class SpanTermQuery

public class SpanTermQuery extends SpanQuery

Matches spans containing a term.
Field Summary
protected Termterm
Constructor Summary
SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.
Method Summary
booleanequals(Object o)
Returns true iff o is equal to this.
voidextractTerms(Set terms)
StringgetField()
SpansgetSpans(IndexReader reader)
TermgetTerm()
Return the term whose spans are matched.
CollectiongetTerms()
Returns a collection of all terms matched by this query.
inthashCode()
Returns a hash code value for this object.
StringtoString(String field)

Field Detail

term

protected Term term

Constructor Detail

SpanTermQuery

public SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.

Method Detail

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

extractTerms

public void extractTerms(Set terms)

getField

public String getField()

getSpans

public Spans getSpans(IndexReader reader)

getTerm

public Term getTerm()
Return the term whose spans are matched.

getTerms

public Collection getTerms()

Deprecated: use extractTerms instead

Returns a collection of all terms matched by this query.

See Also: extractTerms

hashCode

public int hashCode()
Returns a hash code value for this object.

toString

public String toString(String field)
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.