Method UpsertBatchAsync
UpsertBatchAsync(string, IEnumerable<(string Id, float[] Vectors, MetadataCollection Metadata)>, CancellationToken)
Asynchronously inserts or updates multiple vector entries in the specified collection in a single batch operation. This method is more efficient than calling UpsertAsync(string, string, float[], MetadataCollection, CancellationToken) repeatedly for bulk operations.
Task UpsertBatchAsync(string collectionIdentifier, IEnumerable<(string Id, float[] Vectors, MetadataCollection Metadata)> points, CancellationToken cancellationToken = default)
Parameters
collectionIdentifierstringThe name of the collection in which the vectors will be stored.
pointsIEnumerable<(string Id, float[] Vectors, MetadataCollection Metadata)>A collection of tuples, each containing an ID, vector data, and metadata for a single entry. All vector arrays must match the vector size defined for the collection.
cancellationTokenCancellationTokenAn optional cancellation token to cancel the asynchronous batch upsert operation.
Returns
- Task
A task representing the asynchronous batch upsert operation.