Method SearchSimilarVectorsAsync
SearchSimilarVectorsAsync(string, float[], uint, bool, bool, CancellationToken)
Asynchronously searches for vectors within the specified collection that are similar to a given query vector.
public Task<List<(PointEntry Point, float Score)>> SearchSimilarVectorsAsync(string collectionIdentifier, float[] vector, uint limit, bool getVector, bool getMetadata, CancellationToken cancellationToken = default)Parameters
- collectionIdentifierstring
- The name of the collection to search within. 
- vectorfloat[]
- The query vector used to compute similarity against stored vectors. The length of this vector should match the collection's defined vector size. 
- limituint
- The maximum number of similar vector entries to return. 
- getVectorbool
- If - true, the vector data for each matching entry will be included in the results.
- getMetadatabool
- If - true, the metadata for each matching entry will be included in the results.
- cancellationTokenCancellationToken
- An optional token to cancel the asynchronous search operation. 
Returns
- Task<List<(PointEntry Point, float Score)>>
- A task representing the asynchronous search operation. The task result is a list of tuples, where each tuple contains a PointEntry and a - floatsimilarity score. The similarity score is computed using the underlying vector similarity algorithm defined by the implementation.