Class SearchScoreThreshold

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

public final class SearchScoreThreshold extends VectorThreshold
The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchScoreThreshold(double value)
    Creates an instance of SearchScoreThreshold class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SearchScoreThreshold from the JsonReader.
    Get the kind property: The kind of threshold used to filter vector queries.
    double
    /** Get the value property: The threshold will filter based on the '@search.score' value.
    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

    • SearchScoreThreshold

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

    • getKind

      public VectorThresholdKind getKind()
      Get the kind property: The kind of threshold used to filter vector queries.
      Overrides:
      getKind in class VectorThreshold
      Returns:
      the kind value.
    • getValue

      public double getValue()
      /** Get the value property: The threshold will filter based on the '@search.score' value. Note this is the `@search.score` returned as part of the search response. The threshold direction will be chosen for higher `@search.score`.
      Returns:
      the value. /
    • toJson

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

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