Method UpdateMetadataAsync
UpdateMetadataAsync(string, string, MetadataCollection, bool, CancellationToken)
Asynchronously updates the metadata associated with an existing vector entry in the specified collection.
public Task UpdateMetadataAsync(string collectionIdentifier, string id, MetadataCollection metadata, bool clearFirst, CancellationToken cancellationToken = default)Parameters
- collectionIdentifierstring
- The name of the collection containing the vector whose metadata is to be updated. 
- idstring
- The unique identifier of the vector entry for which the metadata is being updated. 
- metadataMetadataCollection
- A collection of key-value pairs representing the metadata to update. The keys correspond to metadata names, and the values are the new values to be set. 
- clearFirstbool
- If set to - true, any existing metadata will be cleared before the new metadata is applied. If- false, the new metadata will be merged with the existing metadata.
- cancellationTokenCancellationToken
- An optional token to cancel the asynchronous metadata update operation. 
Returns
- Task
- A task representing the asynchronous update operation.