public abstract class SpanPositionCheckQuery extends SpanQuery implements 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,
ScoreMode scoreMode,
float boost)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object other)
Returns true iff
other is equal to this. |
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.
|
void |
visit(QueryVisitor visitor)
Recurse through the query tree, visiting any child queries
|
getTermStates, getTermStates
classHash, sameClassAs, toString, toString
protected SpanQuery match
public SpanPositionCheckQuery(SpanQuery match)
public SpanQuery getMatch()
public String getField()
SpanQuery
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 SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class SpanQuery
scoreMode
- How the produced scorers will be consumed.boost
- The boost that is propagated by the parent queries.IOException
public Query rewrite(IndexReader reader) throws IOException
Query
rewrite
in class Query
IOException
public void visit(QueryVisitor visitor)
Query
public boolean equals(Object other)
other
is equal to this.equals
in class Query
Query.sameClassAs(Object)
,
Query.classHash()
public int hashCode()
Query
QueryCache
works properly.hashCode
in class Query
Query.equals(Object)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.