Class ScoringProfile
java.lang.Object
com.azure.search.documents.indexes.models.ScoringProfile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScoringProfile>
public final class ScoringProfile
extends Object
implements com.azure.json.JsonSerializable<ScoringProfile>
Defines parameters for a search index that influence scoring in search queries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScoringProfilefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ScoringProfile from the JsonReader.Get the functionAggregation property: A value indicating how the results of individual scoring functions should be combined.Get the functions property: The collection of functions that influence the scoring of documents.getName()Get the name property: The name of the scoring profile.Get the textWeights property: Parameters that boost scoring based on text matches in certain index fields.setFunctionAggregation(ScoringFunctionAggregation functionAggregation) Set the functionAggregation property: A value indicating how the results of individual scoring functions should be combined.setFunctions(ScoringFunction... functions) Set the functions property: The collection of functions that influence the scoring of documents.setFunctions(List<ScoringFunction> functions) Set the functions property: The collection of functions that influence the scoring of documents.setTextWeights(TextWeights textWeights) Set the textWeights property: Parameters that boost scoring based on text matches in certain index fields.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ScoringProfile
Creates an instance of ScoringProfile class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getName
Get the name property: The name of the scoring profile.- Returns:
- the name value.
-
getTextWeights
Get the textWeights property: Parameters that boost scoring based on text matches in certain index fields.- Returns:
- the textWeights value.
-
setTextWeights
Set the textWeights property: Parameters that boost scoring based on text matches in certain index fields.- Parameters:
textWeights- the textWeights value to set.- Returns:
- the ScoringProfile object itself.
-
getFunctions
Get the functions property: The collection of functions that influence the scoring of documents.- Returns:
- the functions value.
-
setFunctions
Set the functions property: The collection of functions that influence the scoring of documents.- Parameters:
functions- the functions value to set.- Returns:
- the ScoringProfile object itself.
-
getFunctionAggregation
Get the functionAggregation property: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions.- Returns:
- the functionAggregation value.
-
setFunctionAggregation
Set the functionAggregation property: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions.- Parameters:
functionAggregation- the functionAggregation value to set.- Returns:
- the ScoringProfile object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ScoringProfile>- Throws:
IOException
-
fromJson
Reads an instance of ScoringProfile from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ScoringProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ScoringProfile.
-
setFunctions
Set the functions property: The collection of functions that influence the scoring of documents.- Parameters:
functions- the functions value to set.- Returns:
- the ScoringProfile object itself.
-