FreshnessScoringFunction Class

Defines a function that boosts scores based on the value of a date-time field.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.search.documents.indexes._generated.models._models_py3.ScoringFunction
FreshnessScoringFunction

Constructor

FreshnessScoringFunction(*, field_name: str, boost: float, parameters: azure.search.documents.indexes._generated.models._models_py3.FreshnessScoringParameters, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)

Parameters

type
str
Required

Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

field_name
str
Required

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

boost
float
Required

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

interpolation
str or ScoringFunctionInterpolation
Required

A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic".

parameters
FreshnessScoringParameters
Required

Required. Parameter values for the freshness scoring function.