Package org.apache.lucene.search
Class MaxScoreCache
java.lang.Object
org.apache.lucene.search.MaxScoreCache
Compute maximum scores based on
Impacts
and keep them in a cache in order not to run
expensive similarity score computations multiple times on the same data.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorDescriptionMaxScoreCache
(ImpactsSource impactsSource, Similarity.SimScorer scorer) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
advanceShallow
(int target) Implement the contract ofScorer.advanceShallow(int)
based on the wrappedImpactsSource
.float
getMaxScore
(int upTo) Return the maximum score up to upTo included.
-
Constructor Details
-
MaxScoreCache
Sole constructor.
-
-
Method Details
-
advanceShallow
Implement the contract ofScorer.advanceShallow(int)
based on the wrappedImpactsSource
.- Throws:
IOException
- See Also:
-
getMaxScore
Return the maximum score up to upTo included.- Throws:
IOException
- See Also:
-