ScoringFunction Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. ScoringFunction
- com.
Implements
public class ScoringFunction
implements JsonSerializable<ScoringFunction>
Base type for functions that can modify document scores during ranking.
Constructor | Description |
---|---|
Scoring |
Creates an instance of Scoring |
Modifier and Type | Method and Description |
---|---|
static
Scoring |
from Reads an instance of Scoring |
double |
get Get the boost property: A multiplier for the raw score. |
String |
get Get the field |
Scoring |
get Get the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". |
String |
get Get the type property: Indicates the type of function to use. |
Scoring |
set Set the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". |
Json |
to |
Methods inherited from java.lang.Object
ScoringFunction
public ScoringFunction(String fieldName, double boost)
Creates an instance of ScoringFunction class.
Parameters:
fromJson
public static ScoringFunction fromJson(JsonReader jsonReader)
Reads an instance of ScoringFunction from the JsonReader.
Parameters:
Returns:
Throws:
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:
getFieldName
public String getFieldName()
Get the fieldName property: The name of the field used as input to the scoring function.
Returns:
getInterpolation
public ScoringFunctionInterpolation getInterpolation()
Get the interpolation property: A value indicating how boosting will be interpolated across document scores; defaults to "Linear".
Returns:
getType
public String getType()
Get the type property: Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.
Returns:
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:
Returns:
toJson
Azure SDK for Java-feedback
Azure SDK for Java is een open source project. Selecteer een koppeling om feedback te geven: