Class MagnitudeScoringParameters

java.lang.Object
com.azure.search.documents.indexes.models.MagnitudeScoringParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<MagnitudeScoringParameters>

public final class MagnitudeScoringParameters extends Object implements com.azure.json.JsonSerializable<MagnitudeScoringParameters>
Provides parameter values to a magnitude scoring function.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MagnitudeScoringParameters(double boostingRangeStart, double boostingRangeEnd)
    Creates an instance of MagnitudeScoringParameters class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of MagnitudeScoringParameters from the JsonReader.
    double
    Get the boostingRangeEnd property: The field value at which boosting ends.
    double
    Get the boostingRangeStart property: The field value at which boosting starts.
    setShouldBoostBeyondRangeByConstant(Boolean shouldBoostBeyondRangeByConstant)
    Set the shouldBoostBeyondRangeByConstant property: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.
    Get the shouldBoostBeyondRangeByConstant property: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • MagnitudeScoringParameters

      public MagnitudeScoringParameters(double boostingRangeStart, double boostingRangeEnd)
      Creates an instance of MagnitudeScoringParameters class.
      Parameters:
      boostingRangeStart - the boostingRangeStart value to set.
      boostingRangeEnd - the boostingRangeEnd value to set.
  • Method Details

    • getBoostingRangeStart

      public double getBoostingRangeStart()
      Get the boostingRangeStart property: The field value at which boosting starts.
      Returns:
      the boostingRangeStart value.
    • getBoostingRangeEnd

      public double getBoostingRangeEnd()
      Get the boostingRangeEnd property: The field value at which boosting ends.
      Returns:
      the boostingRangeEnd value.
    • shouldBoostBeyondRangeByConstant

      public Boolean shouldBoostBeyondRangeByConstant()
      Get the shouldBoostBeyondRangeByConstant property: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.
      Returns:
      the shouldBoostBeyondRangeByConstant value.
    • setShouldBoostBeyondRangeByConstant

      public MagnitudeScoringParameters setShouldBoostBeyondRangeByConstant(Boolean shouldBoostBeyondRangeByConstant)
      Set the shouldBoostBeyondRangeByConstant property: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.
      Parameters:
      shouldBoostBeyondRangeByConstant - the shouldBoostBeyondRangeByConstant value to set.
      Returns:
      the MagnitudeScoringParameters 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<MagnitudeScoringParameters>
      Throws:
      IOException
    • fromJson

      public static MagnitudeScoringParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MagnitudeScoringParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MagnitudeScoringParameters 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 MagnitudeScoringParameters.