final class Boolean2ScorerSupplier extends ScorerSupplier
| Modifier and Type | Field and Description |
|---|---|
private long |
cost |
private int |
minShouldMatch |
private ScoreMode |
scoreMode |
private java.util.Map<BooleanClause.Occur,java.util.Collection<ScorerSupplier>> |
subs |
private Weight |
weight |
| Constructor and Description |
|---|
Boolean2ScorerSupplier(Weight weight,
java.util.Map<BooleanClause.Occur,java.util.Collection<ScorerSupplier>> subs,
ScoreMode scoreMode,
int minShouldMatch) |
| Modifier and Type | Method and Description |
|---|---|
private long |
computeCost() |
long |
cost()
Get an estimate of the
Scorer that would be returned by ScorerSupplier.get(long). |
private Scorer |
excl(Scorer main,
java.util.Collection<ScorerSupplier> prohibited,
long leadCost) |
Scorer |
get(long leadCost)
Get the
Scorer. |
private Scorer |
opt(java.util.Collection<ScorerSupplier> optional,
int minShouldMatch,
ScoreMode scoreMode,
long leadCost) |
private Scorer |
req(java.util.Collection<ScorerSupplier> requiredNoScoring,
java.util.Collection<ScorerSupplier> requiredScoring,
long leadCost)
Create a new scorer for the given required clauses.
|
private final Weight weight
private final java.util.Map<BooleanClause.Occur,java.util.Collection<ScorerSupplier>> subs
private final ScoreMode scoreMode
private final int minShouldMatch
private long cost
Boolean2ScorerSupplier(Weight weight, java.util.Map<BooleanClause.Occur,java.util.Collection<ScorerSupplier>> subs, ScoreMode scoreMode, int minShouldMatch)
private long computeCost()
public long cost()
ScorerSupplierScorer that would be returned by ScorerSupplier.get(long).
This may be a costly operation, so it should only be called if necessary.cost in class ScorerSupplierDocIdSetIterator.cost()public Scorer get(long leadCost) throws java.io.IOException
ScorerSupplierScorer. This may not return null and must be called
at most once.get in class ScorerSupplierleadCost - Cost of the scorer that will be used in order to lead
iteration. This can be interpreted as an upper bound of the number of times
that DocIdSetIterator.nextDoc(), DocIdSetIterator.advance(int)
and TwoPhaseIterator.matches() will be called. Under doubt, pass
Long.MAX_VALUE, which will produce a Scorer that has good
iteration capabilities.java.io.IOExceptionprivate Scorer req(java.util.Collection<ScorerSupplier> requiredNoScoring, java.util.Collection<ScorerSupplier> requiredScoring, long leadCost) throws java.io.IOException
requiredScoring is a subset of required containing
required clauses that should participate in scoring.java.io.IOExceptionprivate Scorer excl(Scorer main, java.util.Collection<ScorerSupplier> prohibited, long leadCost) throws java.io.IOException
java.io.IOExceptionprivate Scorer opt(java.util.Collection<ScorerSupplier> optional, int minShouldMatch, ScoreMode scoreMode, long leadCost) throws java.io.IOException
java.io.IOException