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 Details

    • ScoringProfile

      public ScoringProfile(String name)
      Creates an instance of ScoringProfile class.
      Parameters:
      name - the name value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the scoring profile.
      Returns:
      the name value.
    • getTextWeights

      public TextWeights getTextWeights()
      Get the textWeights property: Parameters that boost scoring based on text matches in certain index fields.
      Returns:
      the textWeights value.
    • setTextWeights

      public ScoringProfile setTextWeights(TextWeights textWeights)
      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

      public List<ScoringFunction> getFunctions()
      Get the functions property: The collection of functions that influence the scoring of documents.
      Returns:
      the functions value.
    • setFunctions

      public ScoringProfile setFunctions(List<ScoringFunction> functions)
      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

      public ScoringFunctionAggregation 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

      public ScoringProfile setFunctionAggregation(ScoringFunctionAggregation functionAggregation)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ScoringProfile>
      Throws:
      IOException
    • fromJson

      public static ScoringProfile fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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

      public ScoringProfile setFunctions(ScoringFunction... functions)
      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.