Share via


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
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
type DistanceScoringFunction = class
    inherit ScoringFunction
    interface IJsonModel<DistanceScoringFunction>
    interface IPersistableModel<DistanceScoringFunction>
Public Class DistanceScoringFunction
Inherits ScoringFunction
Public Class DistanceScoringFunction
Inherits ScoringFunction
Implements IJsonModel(Of DistanceScoringFunction), IPersistableModel(Of DistanceScoringFunction)
Inheritance
DistanceScoringFunction
Implements

Constructors

DistanceScoringFunction(String, Double, DistanceScoringParameters)

Initializes a new instance of DistanceScoringFunction.

Properties

Boost

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

(Inherited from ScoringFunction)
FieldName

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

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

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