public abstract class SpanPositionCheckQuery extends SpanQuery implements Cloneable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SpanPositionCheckQuery.AcceptStatus
Return value if the match should be accepted
YES, rejected NO,
or rejected and enumeration should advance to the next document NO_AND_ADVANCE. |
protected class |
SpanPositionCheckQuery.PositionCheckSpan |
| Constructor and Description |
|---|
SpanPositionCheckQuery(SpanQuery match) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract SpanPositionCheckQuery.AcceptStatus |
acceptPosition(Spans spans)
Implementing classes are required to return whether the current position is a match for the passed in
"match"
SpanQuery. |
void |
extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
String |
getField()
Returns the name of the field matched by this query.
|
SpanQuery |
getMatch() |
Spans |
getSpans(IndexReader reader)
Expert: Returns the matches for this query in an index.
|
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
createWeightprotected SpanQuery match
public SpanPositionCheckQuery(SpanQuery match)
public SpanQuery getMatch()
public String getField()
SpanQuerypublic void extractTerms(Set<Term> terms)
Queryrewritten form.extractTerms in class Queryprotected abstract SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans) throws IOException
SpanQuery.
This is only called if the underlying Spans.next() for the
match is successfulspans - The Spans instance, positioned at the spot to checkIOExceptionSpans.next()public Spans getSpans(IndexReader reader) throws IOException
SpanQuerygetSpans in class SpanQueryIOExceptionpublic Query rewrite(IndexReader reader) throws IOException
Queryrewrite in class QueryIOException