public abstract class SpanPositionCheckQuery extends SpanQuery implements Cloneable
Modifier and Type | Class and Description |
---|---|
protected static class |
SpanPositionCheckQuery.AcceptStatus
Return value for
acceptPosition(Spans) . |
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(AtomicReaderContext context,
Bits acceptDocs,
Map<Term,TermContext> termContexts)
Expert: Returns the matches for this query in an index.
|
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
createWeight
protected SpanQuery match
public SpanPositionCheckQuery(SpanQuery match)
public SpanQuery getMatch()
public String getField()
SpanQuery
public void extractTerms(Set<Term> terms)
Query
rewritten
form.extractTerms
in class Query
protected 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 checkIOException
Spans.next()
public Spans getSpans(AtomicReaderContext context, Bits acceptDocs, Map<Term,TermContext> termContexts) throws IOException
SpanQuery
getSpans
in class SpanQuery
IOException
public Query rewrite(IndexReader reader) throws IOException
Query
rewrite
in class Query
IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.