public class SpanFirstQuery extends SpanPositionRangeQuery
SpanPositionRangeQuery in that it assumes the
start to be zero and only checks the end boundary.SpanPositionCheckQuery.AcceptStatus, SpanPositionCheckQuery.PositionCheckSpanend, startmatch| Constructor and Description |
|---|
SpanFirstQuery(SpanQuery match,
int end)
Construct a SpanFirstQuery matching spans in
match whose end
position is less than or equal to end. |
| Modifier and Type | Method and Description |
|---|---|
protected SpanPositionCheckQuery.AcceptStatus |
acceptPosition(Spans spans)
Implementing classes are required to return whether the current position is a match for the passed in
"match"
SpanQuery. |
SpanFirstQuery |
clone()
Returns a clone of this query.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
getEnd, getStartextractTerms, getField, getMatch, getSpans, rewritecreateWeightpublic SpanFirstQuery(SpanQuery match, int end)
match whose end
position is less than or equal to end.protected SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans) throws IOException
SpanPositionCheckQuerySpanQuery.
This is only called if the underlying Spans.next() for the
match is successfulacceptPosition in class SpanPositionRangeQueryspans - The Spans instance, positioned at the spot to checkIOExceptionSpans.next()public String toString(String field)
Queryfield assumed to be the
default field and omitted.toString in class SpanPositionRangeQuerypublic SpanFirstQuery clone()
Queryclone in class SpanPositionRangeQuerypublic boolean equals(Object o)
equals in class SpanPositionRangeQuerypublic int hashCode()
hashCode in class SpanPositionRangeQueryCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.