org.apache.lucene.search.spans

Class SpanFirstQuery

public class SpanFirstQuery extends SpanQuery

Matches spans near the beginning of a field.
Constructor Summary
SpanFirstQuery(SpanQuery match, int end)
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.
Method Summary
booleanequals(Object o)
voidextractTerms(Set terms)
intgetEnd()
Return the maximum end position permitted in a match.
StringgetField()
SpanQuerygetMatch()
Return the SpanQuery whose matches are filtered.
SpansgetSpans(IndexReader reader)
CollectiongetTerms()
Returns a collection of all terms matched by this query.
inthashCode()
Queryrewrite(IndexReader reader)
StringtoString(String field)

Constructor Detail

SpanFirstQuery

public SpanFirstQuery(SpanQuery match, int end)
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.

Method Detail

equals

public boolean equals(Object o)

extractTerms

public void extractTerms(Set terms)

getEnd

public int getEnd()
Return the maximum end position permitted in a match.

getField

public String getField()

getMatch

public SpanQuery getMatch()
Return the SpanQuery whose matches are filtered.

getSpans

public Spans getSpans(IndexReader reader)

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()

rewrite

public Query rewrite(IndexReader reader)

toString

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