public abstract class SpanPositionCheckQuery extends SpanQuery implements Cloneable
Constructor and Description |
---|
SpanPositionCheckQuery(SpanQuery match) |
Modifier and Type | Method and Description |
---|---|
protected abstract 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
o is equal to this. |
void |
extractTerms(Set<Term> terms)
Extract terms from these spans.
|
String |
getField()
Returns the name of the field matched by this query.
|
SpanQuery |
getMatch() |
Spans |
getSpans(LeafReaderContext context,
Bits acceptDocs,
Map<Term,TermContext> termContexts)
Expert: Returns the matches for this query in an index.
|
int |
hashCode() |
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
Note that this may return null if the query matches no terms.
public void extractTerms(Set<Term> terms)
SpanQuery
extractTerms
in class SpanQuery
Weight.extractTerms(java.util.Set<org.apache.lucene.index.Term>)
protected abstract FilterSpans.AcceptStatus acceptPosition(Spans spans) throws IOException
SpanQuery
.
This is only called if the underlying last Spans.nextStartPosition()
for the
match indicated a valid start position.spans
- The Spans
instance, positioned at the spot to checkIOException
DocIdSetIterator.nextDoc()
public Spans getSpans(LeafReaderContext 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
public boolean equals(Object o)
o
is equal to this.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.