SearchResult.EmbeddingMatchInfo
@ExperimentalAppSearchApi
public final class SearchResult.EmbeddingMatchInfo
This class represents match objects for any snippets that might be present in SearchResults from an embedding query. Using this class, you can get:
- the semantic score of the matching vector with the embedding query
- the query embedding vector index - the index of the query
EmbeddingVectorin the list returned bygetEmbeddingParameters - the embedding search metric type for the corresponding query
Summary
Public constructors |
|---|
@ExperimentalAppSearchApiCreates a new immutable EmbeddingMatchInfo. |
Public methods |
|
|---|---|
int |
Gets the embedding search metric type that this embedding match corresponds to. |
int |
Gets the index of the query vector that this embedding match corresponds to. |
double |
Gets the semantic score corresponding to the embedding match. |
Public constructors
EmbeddingMatchInfo
@ExperimentalAppSearchApi
public EmbeddingMatchInfo(
double semanticScore,
int queryEmbeddingVectorIndex,
int embeddingSearchMetricType
)
Creates a new immutable EmbeddingMatchInfo.
| Parameters | |
|---|---|
double semanticScore |
the semantic score of the embedding match against the query vector. |
int queryEmbeddingVectorIndex |
the index of the matched query embedding vector in |
int embeddingSearchMetricType |
the search metric type used to calculate the score for the match and the query vector |
Public methods
getEmbeddingSearchMetricType
@ExperimentalAppSearchApi
public int getEmbeddingSearchMetricType()
Gets the embedding search metric type that this embedding match corresponds to.
getQueryEmbeddingVectorIndex
@ExperimentalAppSearchApi
public int getQueryEmbeddingVectorIndex()
Gets the index of the query vector that this embedding match corresponds to. This is the index of the query EmbeddingVector in the list returned by getEmbeddingParameters
getSemanticScore
@ExperimentalAppSearchApi
public double getSemanticScore()
Gets the semantic score corresponding to the embedding match.