Class DistanceScoringFunction
java.lang.Object
com.azure.search.documents.indexes.models.ScoringFunction
com.azure.search.documents.indexes.models.DistanceScoringFunction
Defines a function that boosts scores based on distance from a geographic location.
-
Constructor Summary
ConstructorsConstructorDescriptionDistanceScoringFunction
(String fieldName, double boost, DistanceScoringParameters parameters) Creates an instance of DistanceScoringFunction class. -
Method Summary
Modifier and TypeMethodDescriptionGet the parameters property: Parameter values for the distance scoring function.setInterpolation
(ScoringFunctionInterpolation interpolation) Set the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".Methods inherited from class com.azure.search.documents.indexes.models.ScoringFunction
getBoost, getFieldName, getInterpolation
-
Constructor Details
-
DistanceScoringFunction
public DistanceScoringFunction(String fieldName, double boost, DistanceScoringParameters parameters) Creates an instance of DistanceScoringFunction class.- Parameters:
fieldName
- the fieldName value to set.boost
- the boost value to set.parameters
- the parameters value to set.
-
-
Method Details
-
getParameters
Get the parameters property: Parameter values for the distance scoring function.- Returns:
- the parameters value.
-
setInterpolation
Set the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".- Overrides:
setInterpolation
in classScoringFunction
- Parameters:
interpolation
- the interpolation value to set.- Returns:
- the ScoringFunction object itself.
-