SearchModelFactory.FreshnessScoringFunction Method

Definition

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

public static Azure.Search.Documents.Indexes.Models.FreshnessScoringFunction FreshnessScoringFunction(string fieldName = default, double boost = 0, Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation? interpolation = default, Azure.Search.Documents.Indexes.Models.FreshnessScoringParameters parameters = default);
static member FreshnessScoringFunction : string * double * Nullable<Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation> * Azure.Search.Documents.Indexes.Models.FreshnessScoringParameters -> Azure.Search.Documents.Indexes.Models.FreshnessScoringFunction
Public Shared Function FreshnessScoringFunction (Optional fieldName As String = Nothing, Optional boost As Double = 0, Optional interpolation As Nullable(Of ScoringFunctionInterpolation) = Nothing, Optional parameters As FreshnessScoringParameters = Nothing) As FreshnessScoringFunction

Parameters

fieldName
String

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

boost
Double

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

interpolation
Nullable<ScoringFunctionInterpolation>

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

parameters
FreshnessScoringParameters

Parameter values for the freshness scoring function.

Returns

A new FreshnessScoringFunction instance for mocking.

Applies to