Class SpanPayloadCheckQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.queries.spans.SpanQuery
-
- org.apache.lucene.queries.payloads.SpanPayloadCheckQuery
-
public class SpanPayloadCheckQuery extends SpanQuery
Only return those matches that have a specific payload at the given position.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SpanPayloadCheckQuery.MatchOperation
The payload type.static class
SpanPayloadCheckQuery.PayloadType
The payload type.class
SpanPayloadCheckQuery.SpanPayloadCheckWeight
Weight that pulls its Spans using a PayloadSpanCollector
-
Field Summary
Fields Modifier and Type Field Description protected SpanQuery
match
protected SpanPayloadCheckQuery.MatchOperation
operation
protected List<BytesRef>
payloadToMatch
protected SpanPayloadCheckQuery.PayloadType
payloadType
-
Constructor Summary
Constructors Constructor Description SpanPayloadCheckQuery(SpanQuery match, List<BytesRef> payloadToMatch)
SpanPayloadCheckQuery(SpanQuery match, List<BytesRef> payloadToMatch, SpanPayloadCheckQuery.PayloadType payloadType, SpanPayloadCheckQuery.MatchOperation operation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanWeight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
boolean
equals(Object other)
String
getField()
Returns the name of the field matched by this query.int
hashCode()
Query
rewrite(IndexSearcher indexSearcher)
String
toString(String field)
void
visit(QueryVisitor visitor)
-
Methods inherited from class org.apache.lucene.queries.spans.SpanQuery
getTermStates, getTermStates
-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Field Detail
-
match
protected final SpanQuery match
-
operation
protected final SpanPayloadCheckQuery.MatchOperation operation
-
payloadType
protected final SpanPayloadCheckQuery.PayloadType payloadType
-
-
Constructor Detail
-
SpanPayloadCheckQuery
public SpanPayloadCheckQuery(SpanQuery match, List<BytesRef> payloadToMatch, SpanPayloadCheckQuery.PayloadType payloadType, SpanPayloadCheckQuery.MatchOperation operation)
-
-
Method Detail
-
getField
public String getField()
Description copied from class:SpanQuery
Returns the name of the field matched by this query.
-
createWeight
public SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
- Specified by:
createWeight
in classSpanQuery
- Throws:
IOException
-
rewrite
public Query rewrite(IndexSearcher indexSearcher) throws IOException
- Overrides:
rewrite
in classQuery
- Throws:
IOException
-
visit
public void visit(QueryVisitor visitor)
-
-