Package version:

Interface BaseScoringFunction

Base type for functions that can modify document scores during ranking.

interface BaseScoringFunction {
    boost: number;
    fieldName: string;
    interpolation?: ScoringFunctionInterpolation;
    type:
        | "distance"
        | "freshness"
        | "magnitude"
        | "tag";
}

Hierarchy (view full)

Properties

boost: number

A multiplier for the raw score. Must be a positive number not equal to 1.0.

fieldName: string

The name of the field used as input to the scoring function.

A value indicating how boosting will be interpolated across document scores; defaults to "Linear".

type:
    | "distance"
    | "freshness"
    | "magnitude"
    | "tag"

Polymorphic discriminator, which specifies the different types this object can be