SimScorer

abstract class SimScorer

Stores the weight for a query across the indexed collection. This abstract implementation is empty; descendants of Similarity should subclass SimWeight and define the statistics they require in the subclass. Examples include idf, average field length, etc.

Functions

Link copied to clipboard
open fun explain(freq: Explanation, norm: Long): Explanation

Explain the score for a single document

Link copied to clipboard
abstract fun score(freq: Float, norm: Long): Float

Score a single document. freq is the document-term sloppy frequency and must be finite and positive. norm is the encoded normalization factor as computed by at index time, or 1 if norms are disabled. norm is never 0.