Package org.apache.lucene.search
Class Weight.DefaultScorerSupplier
java.lang.Object
org.apache.lucene.search.ScorerSupplier
org.apache.lucene.search.Weight.DefaultScorerSupplier
- Enclosing class:
Weight
A wrap for default scorer supplier.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.lucene.search.ScorerSupplier
bulkScorer, setTopLevelScoringClause
-
Constructor Details
-
DefaultScorerSupplier
-
-
Method Details
-
get
Description copied from class:ScorerSupplier
Get theScorer
. This may not returnnull
and must be called at most once.- Specified by:
get
in classScorerSupplier
- Parameters:
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 thatDocIdSetIterator.nextDoc()
,DocIdSetIterator.advance(int)
andTwoPhaseIterator.matches()
will be called. Under doubt, passLong.MAX_VALUE
, which will produce aScorer
that has good iteration capabilities.- Throws:
IOException
-
cost
public long cost()Description copied from class:ScorerSupplier
Get an estimate of theScorer
that would be returned byScorerSupplier.get(long)
. This may be a costly operation, so it should only be called if necessary.- Specified by:
cost
in classScorerSupplier
- See Also:
-