ภาษา

DistanceScoringFunction Class

Definition

Defines a function that boosts scores based on distance from a geographic location.

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

Constructors

Name Description
DistanceScoringFunction(String, Double, DistanceScoringParameters)

Initializes a new instance of DistanceScoringFunction.

Properties

Name Description
Boost

Gets or sets the score multiplier.

Boost

Gets or sets a multiplier for the raw score.

(Inherited from ScoringFunction)
FieldName

Gets or sets the input field name.

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

Parameter values for the distance scoring function.

Methods

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

Explicit Interface Implementations

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

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

IJsonModel<DistanceScoringFunction>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

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<DistanceScoringFunction>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<DistanceScoringFunction>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<DistanceScoringFunction>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

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