Scorable

abstract class Scorable

Allows access to the score of a Query

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class ChildScorable(val child: Scorable, val relationship: String)

A child Scorer and its relationship to its parent. The meaning of the relationship depends upon the parent query.

Properties

Link copied to clipboard
Link copied to clipboard

Optional method: Tell the scorer that its iterator may safely ignore all documents whose score is less than the given minScore. This is a no-op by default.

Functions

Link copied to clipboard
abstract fun score(): Float

Returns the score of the current document matching the query.

Link copied to clipboard
open fun smoothingScore(docId: Int): Float

Returns the smoothing score of the current document matching the query. This score is used when the query/term does not appear in the document, and behaves like an idf. The smoothing score is particularly important when the Scorer returns a product of probabilities so that the document score does not go to zero when one probability is zero. This can return 0 or a smoothing score.