public abstract class ScorerSupplier extends Object
| Constructor and Description |
|---|
ScorerSupplier() |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
cost()
Get an estimate of the
Scorer that would be returned by get(boolean). |
abstract Scorer |
get(boolean randomAccess)
Get the
Scorer. |
public abstract Scorer get(boolean randomAccess) throws IOException
Scorer. This may not return null and must be called
at most once.randomAccess - A hint about the expected usage of the Scorer.
If DocIdSetIterator.advance(int) or TwoPhaseIterator will be
used to check whether given doc ids match, then pass true.
Otherwise if the Scorer will be mostly used to lead the iteration
using DocIdSetIterator.nextDoc(), then false should be
passed. Under doubt, pass false which usually has a better
worst-case.IOExceptionpublic abstract long cost()
Scorer that would be returned by get(boolean).
This may be a costly operation, so it should only be called if necessary.DocIdSetIterator.cost()Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.