public class SpanPositionRangeQuery extends SpanPositionCheckQuery
SpanPositionCheckQuery.getMatch()
lies between a start and end position
See SpanFirstQuery
for a derivation that is optimized for the case where start position is 0.SpanPositionCheckQuery.SpanPositionCheckWeight
Modifier and Type | Field and Description |
---|---|
protected int |
end |
protected int |
start |
match
Constructor and Description |
---|
SpanPositionRangeQuery(SpanQuery match,
int start,
int 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 . |
boolean |
equals(Object o)
Returns true iff
other is equal to this. |
int |
getEnd() |
int |
getStart() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
createWeight, getField, getMatch, rewrite, visit
getTermStates, getTermStates
classHash, sameClassAs, toString
public SpanPositionRangeQuery(SpanQuery match, int start, int 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 SpanPositionCheckQuery
spans
- The Spans
instance, positioned at the spot to checkIOException
DocIdSetIterator.nextDoc()
public int getStart()
public int getEnd()
public String toString(String field)
Query
field
assumed to be the
default field and omitted.public boolean equals(Object o)
SpanPositionCheckQuery
other
is equal to this.equals
in class SpanPositionCheckQuery
Query.sameClassAs(Object)
,
Query.classHash()
public int hashCode()
Query
QueryCache
works properly.hashCode
in class SpanPositionCheckQuery
Query.equals(Object)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.