public class SpanOrQuery.SpanOrWeight extends SpanWeight
SpanWeight.Postings
Weight.DefaultBulkScorer
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<SpanWeight> |
subWeights |
field, similarity, simWeight
parentQuery
Constructor and Description |
---|
SpanOrWeight(IndexSearcher searcher,
java.util.Map<Term,TermContext> terms,
java.util.List<SpanWeight> subWeights) |
Modifier and Type | Method and Description |
---|---|
void |
extractTermContexts(java.util.Map<Term,TermContext> contexts)
Collect all TermContexts used by this Weight
|
void |
extractTerms(java.util.Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
Spans |
getSpans(LeafReaderContext context,
SpanWeight.Postings requiredPostings)
Expert: Return a Spans object iterating over matches from this Weight
|
explain, getSimScorer, getValueForNormalization, normalize, scorer
bulkScorer, getQuery
final java.util.List<SpanWeight> subWeights
public SpanOrWeight(IndexSearcher searcher, java.util.Map<Term,TermContext> terms, java.util.List<SpanWeight> subWeights) throws java.io.IOException
java.io.IOException
public 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 void extractTermContexts(java.util.Map<Term,TermContext> contexts)
SpanWeight
extractTermContexts
in class SpanWeight
contexts
- a map to add the TermContexts topublic Spans getSpans(LeafReaderContext context, SpanWeight.Postings requiredPostings) throws java.io.IOException
SpanWeight
getSpans
in class SpanWeight
context
- a LeafReaderContext for this Spansjava.io.IOException
- on error