public class SpanNotQuery.SpanNotWeight extends SpanWeight
SpanWeight.Postings
Weight.DefaultBulkScorer
field, similarity, simWeight
parentQuery
Constructor and Description |
---|
SpanNotWeight(IndexSearcher searcher,
Map<Term,TermContext> terms,
SpanWeight includeWeight,
SpanWeight excludeWeight,
float boost) |
Modifier and Type | Method and Description |
---|---|
void |
extractTermContexts(Map<Term,TermContext> contexts)
Collect all TermContexts used by this Weight
|
void |
extractTerms(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
|
boolean |
isCacheable(LeafReaderContext ctx) |
explain, getSimScorer, scorer
bulkScorer, getQuery, scorerSupplier
public SpanNotWeight(IndexSearcher searcher, Map<Term,TermContext> terms, SpanWeight includeWeight, SpanWeight excludeWeight, float boost) throws IOException
IOException
public void extractTermContexts(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 IOException
SpanWeight
getSpans
in class SpanWeight
context
- a LeafReaderContext for this SpansIOException
- on errorpublic void extractTerms(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 leafCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.