public abstract class SpanPositionCheckQuery extends SpanQuery implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
class |
SpanPositionCheckQuery.SpanPositionCheckWeight |
| 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. |
SpanWeight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(java.lang.Object other)
Returns true iff
other is equal to this. |
java.lang.String |
getField()
Returns the name of the field matched by this query.
|
SpanQuery |
getMatch() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
getTermContexts, getTermContextsclassHash, sameClassAs, toString, toStringprotected SpanQuery match
public SpanPositionCheckQuery(SpanQuery match)
public SpanQuery getMatch()
public java.lang.String getField()
SpanQueryprotected abstract FilterSpans.AcceptStatus acceptPosition(Spans spans) throws java.io.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 checkjava.io.IOExceptionDocIdSetIterator.nextDoc()public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws java.io.IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class SpanQueryneedsScores - True if document scores (Scorer.score()) or match
frequencies (Scorer.freq()) are needed.java.io.IOExceptionpublic Query rewrite(IndexReader reader) throws java.io.IOException
Querypublic boolean equals(java.lang.Object other)
other is equal to this.equals in class QueryQuery.sameClassAs(Object),
Query.classHash()public int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)