MaxScoreCache

class MaxScoreCache(impactsSource: ImpactsSource, scorer: Similarity.SimScorer)

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.

Constructors

Link copied to clipboard
constructor(impactsSource: ImpactsSource, scorer: Similarity.SimScorer)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun advanceShallow(target: Int): Int

Implement the contract of Scorer.advanceShallow based on the wrapped [ ].

Link copied to clipboard
fun getMaxScore(upTo: Int): Float

Return the maximum score up to upTo included.

Link copied to clipboard
fun getSkipUpTo(minScore: Float): Int

Return the an inclusive upper bound of documents that all have a score that is less than minScore, or -1 if the current document may be competitive.