ภาษา

SearchModelFactory.RandomScoringFunction Method

Definition

Defines a function that assigns pseudo-random scores to documents for randomized ordering. Random scoring functions do not take a boost. A scoring profile with a random function cannot define text weights or other function types, and can contain only one random function. Random scoring replaces the query and vector similarity scores, including for hybrid queries, so results are returned in random order.

public static Azure.Search.Documents.Indexes.Models.RandomScoringFunction RandomScoringFunction(Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation? interpolation = default, Azure.Search.Documents.Indexes.Models.RandomScoringParameters parameters = default);
static member RandomScoringFunction : Nullable<Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation> * Azure.Search.Documents.Indexes.Models.RandomScoringParameters -> Azure.Search.Documents.Indexes.Models.RandomScoringFunction
Public Shared Function RandomScoringFunction (Optional interpolation As Nullable(Of ScoringFunctionInterpolation) = Nothing, Optional parameters As RandomScoringParameters = Nothing) As RandomScoringFunction

Parameters

interpolation
Nullable<ScoringFunctionInterpolation>

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

parameters
RandomScoringParameters

Optional parameters for seeded random scoring. Omit this property for request-scoped random ordering.

Returns

A new RandomScoringFunction instance for mocking.

Applies to