DeleteAsync(IEnumerable<Object> keys, CancellationToken)
This method deletes a batch of records from the vector store. It does not guarantee that the collection exists.
Declaration
// C#
public async Task DeleteAsync(IEnumerable<Object> keys, CancellationToken cancellationToken = default);
Parameters
keys
The unique keys associated with the records to delete.
cancellationToken
The cancellation token.
Return Value
A task representing the asynchronous operation when the records are deleted.
Implements
Microsoft.Extensions.VectorData.VectorStoreCollection
Exceptions
VectorStoreException
: The command fails to execute for any reason other than the absence of a record.
Remarks
If a record is not found, it is ignored, and the batch operation succeeds. However, if a record cannot be deleted for any reason, the operation throws an error. Since some records may have already been deleted while others have not, the entire operation needs to be retried.
Unlike OracleCollection
, OracleDynamicColloection
uses Object as TKey
, and Dictionary<string, object?>
as TRecord
. Please make sure to use the correct parameter types: IEnumerable<Object>
for keys.