DeleteAsync(TKey key, CancellationToken)

This method deletes a record from the vector store. It does not guarantee that the collection exists.

Declaration

// C#
public async Task DeleteAsync(<TKey> key, CancellationToken cancellationToken = default);

Parameters

  • key

    The unique key associated with the record to delete.

  • cancellationToken

    The cancellation token.

Return Value

A task representing the asynchronous operation that completes when the record is deleted.

Implements

Microsoft.Extensions.VectorData.VectorStoreCollection

Exceptions

VectorStoreException: The command fails to execute for any reason other than the absence of a record.