Class ScoringFunction
- java.lang.Object
-
- com.azure.search.documents.indexes.models.ScoringFunction
-
- Direct Known Subclasses:
DistanceScoringFunction
,FreshnessScoringFunction
,MagnitudeScoringFunction
,TagScoringFunction
public abstract class ScoringFunction extends Object
Base type for functions that can modify document scores during ranking.
-
-
Constructor Summary
Constructors Constructor Description ScoringFunction(String fieldName, double boost)
Creates an instance of ScoringFunction class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBoost()
Get the boost property: A multiplier for the raw score.String
getFieldName()
Get the fieldName property: The name of the field used as input to the scoring function.ScoringFunctionInterpolation
getInterpolation()
Get the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".ScoringFunction
setInterpolation(ScoringFunctionInterpolation interpolation)
Set the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".
-
-
-
Constructor Detail
-
ScoringFunction
public ScoringFunction(String fieldName, double boost)
Creates an instance of ScoringFunction class.- Parameters:
fieldName
- the fieldName value to set.boost
- the boost value to set.
-
-
Method Detail
-
getFieldName
public String getFieldName()
Get the fieldName property: The name of the field used as input to the scoring function.- Returns:
- the fieldName value.
-
getBoost
public double getBoost()
Get the boost property: A multiplier for the raw score. Must be a positive number not equal to 1.0.- Returns:
- the boost value.
-
getInterpolation
public ScoringFunctionInterpolation getInterpolation()
Get the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".- Returns:
- the interpolation value.
-
setInterpolation
public ScoringFunction setInterpolation(ScoringFunctionInterpolation interpolation)
Set the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".- Parameters:
interpolation
- the interpolation value to set.- Returns:
- the ScoringFunction object itself.
-
-