ภาษา

ScoringFunction Class

Definition

Base type for functions that can modify document scores during ranking. Please note this is the base class. The derived classes available for instantiation are: DistanceScoringFunction, FreshnessScoringFunction, MagnitudeScoringFunction, RandomScoringFunction, and TagScoringFunction.

public class ScoringFunction : System.ClientModel.Primitives.IJsonModel<Azure.Search.Documents.Indexes.Models.ScoringFunction>, System.ClientModel.Primitives.IPersistableModel<Azure.Search.Documents.Indexes.Models.ScoringFunction>
type ScoringFunction = class
    interface IJsonModel<ScoringFunction>
    interface IPersistableModel<ScoringFunction>
Public Class ScoringFunction
Implements IJsonModel(Of ScoringFunction), IPersistableModel(Of ScoringFunction)
Inheritance
ScoringFunction
Derived
Implements

Constructors

Name Description
ScoringFunction(String, Double, String)

Initializes a scoring function for a field.

ScoringFunction(String)

Initializes a new instance of ScoringFunction.

Properties

Name Description
Boost

Gets or sets a multiplier for the raw score.

FieldName

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

Interpolation

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

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the common scoring function properties.

PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

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

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

IJsonModel<ScoringFunction>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ScoringFunction>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ScoringFunction>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<ScoringFunction>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to