Method RetrieveFromMetadataAsync
RetrieveFromMetadataAsync(string, MetadataCollection, VectorRetrievalOptions, uint, CancellationToken)
Asynchronously retrieves vector entries from the specified collection that match the given metadata criteria.
Task<List<PointEntry>> RetrieveFromMetadataAsync(string collectionIdentifier, MetadataCollection metadata, VectorRetrievalOptions options, uint maxResults, CancellationToken cancellationToken = default)
Parameters
collectionIdentifierstringThe name of the collection to search within.
metadataMetadataCollectionA collection of metadata key-value pairs to filter the search results. Only entries that match these pairs are returned.
optionsVectorRetrievalOptionsA combination of VectorRetrievalOptions flags indicating which parts of each matching entry (vector data, metadata, or both) are included in the returned PointEntry.
maxResultsuintThe maximum number of entries to return. Use this to limit memory usage and response time when querying large collections.
cancellationTokenCancellationTokenAn optional token that can be used to cancel the asynchronous retrieval operation.
Returns
- Task<List<PointEntry>>
A task representing the asynchronous retrieval operation. The task result is a list of PointEntry items. Each PointEntry may include vector data and/or metadata based on the parameters specified.