private static class ToParentBlockJoinQuery.BlockJoinWeight extends FilterWeight
Weight.DefaultBulkScorer
Modifier and Type | Field and Description |
---|---|
private BitSetProducer |
parentsFilter |
private ScoreMode |
scoreMode |
in
parentQuery
Constructor and Description |
---|
BlockJoinWeight(Query joinQuery,
Weight childWeight,
BitSetProducer parentsFilter,
ScoreMode scoreMode) |
Modifier and Type | Method and Description |
---|---|
Explanation |
explain(LeafReaderContext context,
int doc)
An explanation of the score computation for the named document.
|
Scorer |
scorer(LeafReaderContext context)
Returns a
Scorer which can iterate in order over all matching
documents and assign them a score. |
ScorerSupplier |
scorerSupplier(LeafReaderContext context)
Optional method.
|
extractTerms
bulkScorer, getQuery
private final BitSetProducer parentsFilter
private final ScoreMode scoreMode
public BlockJoinWeight(Query joinQuery, Weight childWeight, BitSetProducer parentsFilter, ScoreMode scoreMode)
public Scorer scorer(LeafReaderContext context) throws java.io.IOException
Weight
Scorer
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 FilterWeight
context
- the LeafReaderContext
for which to return the Scorer
.Scorer
which scores documents in/out-of order.java.io.IOException
- if there is a low-level I/O errorpublic ScorerSupplier scorerSupplier(LeafReaderContext context) throws java.io.IOException
Weight
ScorerSupplier
, which allows to know the cost of the Scorer
before building it. The default implementation calls Weight.scorer(org.apache.lucene.index.LeafReaderContext)
and
builds a ScorerSupplier
wrapper around it.scorerSupplier
in class Weight
java.io.IOException
Weight.scorer(org.apache.lucene.index.LeafReaderContext)
public Explanation explain(LeafReaderContext context, int doc) throws java.io.IOException
Weight
explain
in class FilterWeight
context
- the readers context to create the Explanation
for.doc
- the document's id relative to the given context's readerjava.io.IOException
- if an IOException
occurs