Method UpsertAsync
UpsertAsync(string, string, float[], MetadataCollection, CancellationToken)
Asynchronously inserts a new vector entry or updates an existing one in the specified collection, along with its associated metadata.
public Task UpsertAsync(string collectionIdentifier, string id, float[] vectors, MetadataCollection metadata, CancellationToken cancellationToken = default)Parameters
- collectionIdentifierstring
- The name of the collection in which the vector will be stored. 
- idstring
- A unique identifier for the vector entry. 
- vectorsfloat[]
- An array of floats representing the vector data. The length of the array must match the vector size defined for the collection. 
- metadataMetadataCollection
- A collection of metadata associated with the vector entry. 
- cancellationTokenCancellationToken
- An optional cancellation token to cancel the asynchronous upsert operation. 
Returns
- Task
- A task representing the asynchronous upsert operation.