/
DistanceScoringFunction.cs
30 lines (25 loc) · 1.58 KB
/
DistanceScoringFunction.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
namespace Azure.Search.Documents.Indexes.Models
{
/// <summary> Defines a function that boosts scores based on distance from a geographic location. </summary>
public partial class DistanceScoringFunction : ScoringFunction
{
/// <summary> Initializes a new instance of <see cref="DistanceScoringFunction"/>. </summary>
/// <param name="type"> Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. </param>
/// <param name="fieldName"> The name of the field used as input to the scoring function. </param>
/// <param name="boost"> A multiplier for the raw score. Must be a positive number not equal to 1.0. </param>
/// <param name="interpolation"> A value indicating how boosting will be interpolated across document scores; defaults to "Linear". </param>
/// <param name="parameters"> Parameter values for the distance scoring function. </param>
internal DistanceScoringFunction(string type, string fieldName, double boost, ScoringFunctionInterpolation? interpolation, DistanceScoringParameters parameters) : base(type, fieldName, boost, interpolation)
{
Parameters = parameters;
Type = type ?? "distance";
}
/// <summary> Parameter values for the distance scoring function. </summary>
public DistanceScoringParameters Parameters { get; set; }
}
}