public abstract class RandomAccessWeight extends ConstantScoreWeight
Weights that are based on random-access structures such as live docs or doc values. Such weights return a
Scorerwhich consists of an approximation that matches everything, and a confirmation phase that first checks live docs and then the
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
explain, extractTerms, getValueForNormalization, normalize, score
protected RandomAccessWeight(Query query)
protected abstract Bits getMatchingDocs(LeafReaderContext context) throws IOException
Bitsinstance representing documents that match this weight on the given context. A return value of
nullindicates that no documents matched. Note: it is not needed to care about live docs as they will be checked before the returned bits.
public final Scorer scorer(LeafReaderContext context, Bits acceptDocs) throws IOException
Scorerwhich scores documents in/out-of order according to
NOTE: null can be returned if no documents will be scored by this query.
LeafReaderContextfor which to return the
acceptDocs- Bits that represent the allowable docs to match (typically deleted docs but possibly filtering other documents)
Scorerwhich scores documents in/out-of order.
IOException- if there is a low-level I/O error
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.