Class VectorSimilarityThreshold
java.lang.Object
com.azure.search.documents.models.VectorThreshold
com.azure.search.documents.models.VectorSimilarityThreshold
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VectorThreshold>
The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical
definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be
chosen automatically according to the metric used by the field.
-
Constructor Summary
ConstructorsConstructorDescriptionVectorSimilarityThreshold(double value) Creates an instance of VectorSimilarityThreshold class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorSimilarityThresholdfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VectorSimilarityThreshold from the JsonReader.getKind()Get the kind property: The kind of threshold used to filter vector queries.doublegetValue()Get the value property: The threshold will filter based on the similarity metric value.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
-
VectorSimilarityThreshold
public VectorSimilarityThreshold(double value) Creates an instance of VectorSimilarityThreshold class.- Parameters:
value- the value value to set.
-
-
Method Details
-
getKind
Get the kind property: The kind of threshold used to filter vector queries.- Overrides:
getKindin classVectorThreshold- Returns:
- the kind value.
-
getValue
public double getValue()Get the value property: The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field.- Returns:
- the value value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VectorThreshold>- Overrides:
toJsonin classVectorThreshold- Throws:
IOException
-
fromJson
public static VectorSimilarityThreshold fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VectorSimilarityThreshold from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VectorSimilarityThreshold 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 VectorSimilarityThreshold.
-