SingleVectorFieldResult Class

  • java.lang.Object
    • com.azure.search.documents.models.SingleVectorFieldResult

Implements

public final class SingleVectorFieldResult
implements JsonSerializable<SingleVectorFieldResult>

A single vector field result. Both.

Method Summary

Modifier and Type Method and Description
static SingleVectorFieldResult fromJson(JsonReader jsonReader)

Reads an instance of SingleVectorFieldResult from the JsonReader.

Double getSearchScore()

Get the searchScore property: The.

Double getVectorSimilarity()

Get the vectorSimilarity property: The vector similarity score for this document.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static SingleVectorFieldResult fromJson(JsonReader jsonReader)

Reads an instance of SingleVectorFieldResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SingleVectorFieldResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SingleVectorFieldResult.

getSearchScore

public Double getSearchScore()

Get the searchScore property: The.

Returns:

the searchScore value.

getVectorSimilarity

public Double getVectorSimilarity()

Get the vectorSimilarity property: The vector similarity score for this document. Note this is the canonical definition of similarity metric, not the 'distance' version. For example, cosine similarity instead of cosine distance.

Returns:

the vectorSimilarity value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to