private class SpanNearQuery.SpanGapQuery.SpanGapWeight extends SpanWeight
SpanWeight.Postings
Weight.DefaultBulkScorer
field, similarity, simScorer
parentQuery
Constructor and Description |
---|
SpanGapWeight(IndexSearcher searcher,
float boost) |
Modifier and Type | Method and Description |
---|---|
void |
extractTerms(java.util.Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
void |
extractTermStates(java.util.Map<Term,TermStates> contexts)
Collect all TermStates used by this Weight
|
Spans |
getSpans(LeafReaderContext ctx,
SpanWeight.Postings requiredPostings)
Expert: Return a Spans object iterating over matches from this Weight
|
boolean |
isCacheable(LeafReaderContext ctx) |
explain, getSimScorer, matches, scorer
bulkScorer, getQuery, scorerSupplier
SpanGapWeight(IndexSearcher searcher, float boost) throws java.io.IOException
java.io.IOException
public void extractTermStates(java.util.Map<Term,TermStates> contexts)
SpanWeight
extractTermStates
in class SpanWeight
contexts
- a map to add the TermStates topublic Spans getSpans(LeafReaderContext ctx, SpanWeight.Postings requiredPostings) throws java.io.IOException
SpanWeight
getSpans
in class SpanWeight
ctx
- a LeafReaderContext for this Spansjava.io.IOException
- on errorpublic void extractTerms(java.util.Set<Term> terms)
Weight
Weight
was created with needsScores == true
then this
method will only extract terms which are used for scoring, otherwise it
will extract all terms which are used for matching.extractTerms
in class Weight
public boolean isCacheable(LeafReaderContext ctx)
true
if the object can be cached against a given leaf