public abstract class RandomAccessWeight extends ConstantScoreWeight
Weight
s 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.DefaultBulkScorer
parentQuery
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,
Bits acceptDocs)
Returns a
Scorer which scores documents in/out-of order according
to scoreDocsInOrder . |
explain, extractTerms, getValueForNormalization, normalize, score
bulkScorer, getQuery
protected 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.IOException
public final Scorer scorer(LeafReaderContext context, Bits acceptDocs) throws IOException
Weight
Scorer
which scores documents in/out-of order according
to scoreDocsInOrder
.
NOTE: null can be returned if no documents will be scored by this query.
scorer
in class Weight
context
- the LeafReaderContext
for which to return the Scorer
.acceptDocs
- Bits that represent the allowable docs to match (typically deleted docs
but possibly filtering other documents)Scorer
which scores documents in/out-of order.IOException
- if there is a low-level I/O errorCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.