SingleVectorFieldResult Class
- java.
lang. Object - com.
azure. search. documents. models. SingleVectorFieldResult
- com.
Implements
public final class SingleVectorFieldResult
implements JsonSerializable<SingleVectorFieldResult>
A single vector field result. Both @search.score and vector similarity values are returned. Vector similarity is related to @search.score by an equation.
Constructor Summary
| Constructor | Description |
|---|---|
| SingleVectorFieldResult() |
Creates an instance of Single |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Single |
fromJson(JsonReader jsonReader)
Reads an instance of Single |
| Double |
getSearchScore()
Get the search |
| Double |
getVectorSimilarity()
Get the vector |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
SingleVectorFieldResult
public SingleVectorFieldResult()
Creates an instance of SingleVectorFieldResult class.
Method Details
fromJson
public static SingleVectorFieldResult fromJson(JsonReader jsonReader)
Reads an instance of SingleVectorFieldResult from the JsonReader.
Parameters:
Returns:
Throws:
getSearchScore
public Double getSearchScore()
Get the searchScore property: The @search.score value that is calculated from the vector similarity score. This is the score that's visible in a pure single-field single-vector query.
Returns:
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: