|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.Query org.apache.lucene.search.spans.SpanQuery org.apache.lucene.search.spans.SpanPositionCheckQuery
public abstract class SpanPositionCheckQuery
Base class for filtering a SpanQuery based on the position of a match.
Nested Class Summary | |
---|---|
protected static class |
SpanPositionCheckQuery.AcceptStatus
Return value for acceptPosition(Spans) . |
protected class |
SpanPositionCheckQuery.PositionCheckSpan
|
Field Summary | |
---|---|
protected SpanQuery |
match
|
Constructor Summary | |
---|---|
SpanPositionCheckQuery(SpanQuery match)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.lucene.search.spans.SpanQuery |
---|
createWeight |
Methods inherited from class org.apache.lucene.search.Query |
---|
clone, equals, getBoost, hashCode, setBoost, toString, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SpanQuery match
Constructor Detail |
---|
public SpanPositionCheckQuery(SpanQuery match)
Method Detail |
---|
public SpanQuery getMatch()
public String getField()
SpanQuery
getField
in class 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 successful
spans
- The Spans
instance, positioned at the spot to check
IOException
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |