public abstract class ScorerSupplier extends Object
Constructor and Description |
---|
ScorerSupplier() |
Modifier and Type | Method and Description |
---|---|
abstract long |
cost()
|
abstract Scorer |
get(long leadCost)
Get the
Scorer . |
public abstract Scorer get(long leadCost) throws IOException
Scorer
. This may not return null
and must be called
at most once.leadCost
- 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.IOException
public abstract long cost()
Scorer
that would be returned by get(long)
.
This may be a costly operation, so it should only be called if necessary.DocIdSetIterator.cost()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.