Package version:

Interface DistanceScoringFunction

Defines a function that boosts scores based on distance from a geographic location.

interface DistanceScoringFunction {
    boost: number;
    fieldName: string;
    interpolation?: ScoringFunctionInterpolation;
    parameters: DistanceScoringParameters;
    type: "distance";
}

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".

Parameter values for the distance scoring function.

type

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