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
Scorer which consists of an approximation that matches
everything, and a confirmation phase that first checks live docs and
then the Bits returned by getMatchingDocs(LeafReaderContext).Weight.DefaultBulkScorerparentQuery| Modifier | Constructor and Description |
|---|---|
protected |
RandomAccessWeight(Query query)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Bits |
getMatchingDocs(LeafReaderContext context)
Return a
Bits instance representing documents that match this
weight on the given context. |
Scorer |
scorer(LeafReaderContext context)
Returns a
Scorer which can iterate in order over all matching
documents and assign them a score. |
boost, explain, extractTerms, getValueForNormalization, normalize, queryNorm, scorebulkScorer, getQueryprotected RandomAccessWeight(Query query)
protected abstract Bits getMatchingDocs(LeafReaderContext context) throws IOException
Bits instance representing documents that match this
weight on the given context. A return value of null indicates
that no documents matched.
Note: it is not needed to care about live docs as they will be checked
before the returned bits.IOExceptionpublic final Scorer scorer(LeafReaderContext context) throws IOException
WeightScorer which 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 Scorer does not have
LeafReader.getLiveDocs() applied, they need to be checked on top.
scorer in class Weightcontext - the LeafReaderContext for which to return the Scorer.Scorer which scores documents in/out-of order.IOException - if there is a low-level I/O errorCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.