Language

RandomScoringFunction Class

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 class RandomScoringFunction : Azure.Search.Documents.Indexes.Models.ScoringFunction, System.ClientModel.Primitives.IJsonModel<Azure.Search.Documents.Indexes.Models.RandomScoringFunction>, System.ClientModel.Primitives.IPersistableModel<Azure.Search.Documents.Indexes.Models.RandomScoringFunction>
type RandomScoringFunction = class
    inherit ScoringFunction
    interface IJsonModel<RandomScoringFunction>
    interface IPersistableModel<RandomScoringFunction>
Public Class RandomScoringFunction
Inherits ScoringFunction
Implements IJsonModel(Of RandomScoringFunction), IPersistableModel(Of RandomScoringFunction)
Inheritance
RandomScoringFunction
Implements

Constructors

Name Description
RandomScoringFunction()

Initializes a new instance of RandomScoringFunction.

Properties

Name Description
Boost

Gets or sets a multiplier for the raw score.

(Inherited from ScoringFunction)
FieldName

Gets or sets the name of the field used as input to the scoring function.

(Inherited from ScoringFunction)
Interpolation

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

(Inherited from ScoringFunction)
Parameters

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

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<RandomScoringFunction>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<RandomScoringFunction>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<ScoringFunction>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from ScoringFunction)
IJsonModel<ScoringFunction>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ScoringFunction)
IPersistableModel<RandomScoringFunction>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<RandomScoringFunction>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<RandomScoringFunction>.Write(ModelReaderWriterOptions)
IPersistableModel<ScoringFunction>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ScoringFunction)
IPersistableModel<ScoringFunction>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from ScoringFunction)
IPersistableModel<ScoringFunction>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ScoringFunction)

Applies to