public class SpanFirstQuery extends SpanPositionRangeQuery
This class is a simple extension of SpanPositionRangeQuery
in that it assumes the
start to be zero and only checks the end boundary.
SpanPositionCheckQuery.SpanPositionCheckWeight
end, start
match
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 FilterSpans.AcceptStatus |
acceptPosition(Spans spans)
Implementing classes are required to return whether the current position is a match for the passed in
"match"
SpanQuery . |
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
equals, getEnd, getStart, hashCode
createWeight, getField, getMatch, rewrite, visit
getTermStates, getTermStates
classHash, sameClassAs, toString
public SpanFirstQuery(SpanQuery match, int end)
match
whose end
position is less than or equal to end
.protected FilterSpans.AcceptStatus acceptPosition(Spans spans) throws IOException
SpanPositionCheckQuery
SpanQuery
.
This is only called if the underlying last Spans.nextStartPosition()
for the
match indicated a valid start position.acceptPosition
in class SpanPositionRangeQuery
spans
- The Spans
instance, positioned at the spot to checkIOException
DocIdSetIterator.nextDoc()
public String toString(String field)
Query
field
assumed to be the
default field and omitted.toString
in class SpanPositionRangeQuery
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.