Module org.apache.lucene.queries
Class SpanPayloadCheckQuery.SpanPayloadCheckWeight
java.lang.Object
org.apache.lucene.search.Weight
org.apache.lucene.queries.spans.SpanWeight
org.apache.lucene.queries.payloads.SpanPayloadCheckQuery.SpanPayloadCheckWeight
- All Implemented Interfaces:
SegmentCacheable
- Enclosing class:
SpanPayloadCheckQuery
Weight that pulls its Spans using a PayloadSpanCollector
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queries.spans.SpanWeight
SpanWeight.PostingsNested classes/interfaces inherited from class org.apache.lucene.search.Weight
Weight.DefaultBulkScorer -
Field Summary
FieldsFields inherited from class org.apache.lucene.queries.spans.SpanWeight
field, similarity, simScorerFields inherited from class org.apache.lucene.search.Weight
parentQuery -
Constructor Summary
ConstructorsConstructorDescriptionSpanPayloadCheckWeight(IndexSearcher searcher, Map<Term, TermStates> termStates, SpanWeight matchWeight, float boost, SpanPayloadCheckQuery.PayloadType payloadType) -
Method Summary
Modifier and TypeMethodDescriptionvoidextractTermStates(Map<Term, TermStates> contexts) Collect all TermStates used by this WeightgetSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) Expert: Return a Spans object iterating over matches from this Weightbooleanscorer(LeafReaderContext context) Returns aScorerwhich can iterate in order over all matching documents and assign them a score.Methods inherited from class org.apache.lucene.queries.spans.SpanWeight
explain, getSimScorer, matchesMethods inherited from class org.apache.lucene.search.Weight
bulkScorer, count, getQuery, scorerSupplier
-
Field Details
-
matchWeight
-
-
Constructor Details
-
SpanPayloadCheckWeight
public SpanPayloadCheckWeight(IndexSearcher searcher, Map<Term, TermStates> termStates, SpanWeight matchWeight, float boost, SpanPayloadCheckQuery.PayloadType payloadType) throws IOException- Throws:
IOException
-
-
Method Details
-
extractTermStates
Description copied from class:SpanWeightCollect all TermStates used by this Weight- Specified by:
extractTermStatesin classSpanWeight- Parameters:
contexts- a map to add the TermStates to
-
getSpans
public Spans getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) throws IOException Description copied from class:SpanWeightExpert: Return a Spans object iterating over matches from this Weight- Specified by:
getSpansin classSpanWeight- Parameters:
context- a LeafReaderContext for this Spans- Returns:
- a Spans
- Throws:
IOException- on error
-
scorer
Description copied from class:WeightReturns aScorerwhich can iterate in order over all matching documents and assign them a score.NOTE: null can be returned if no documents will be scored by this query.
NOTE: The returned
Scorerdoes not haveLeafReader.getLiveDocs()applied, they need to be checked on top.- Overrides:
scorerin classSpanWeight- Parameters:
context- theLeafReaderContextfor which to return theScorer.- Returns:
- a
Scorerwhich scores documents in/out-of order. - Throws:
IOException- if there is a low-level I/O error
-
isCacheable
- Returns:
trueif the object can be cached against a given leaf
-