Table of Contents

Method RemoveAsync

Namespace
MailFathom.Application.Emails.Embeddings.Indexing
Assembly
MailFathom.Application.dll

RemoveAsync(EmbeddingProfileId, CancellationToken)

Removes the approximate index belonging to one profile, if it has one.

Task RemoveAsync(EmbeddingProfileId profileId, CancellationToken cancellationToken)

Parameters

profileId EmbeddingProfileId

The profile whose index is to go.

cancellationToken CancellationToken

Cancels the removal.

Returns

Task

A task that completes when the profile has no index.

Remarks

Takes the identifier alone rather than the profile, because a superseded generation is removed by a caller that holds nothing else about it, and the index is named after the identifier. Removing an index a profile never had is not a failure.

Exceptions

EmbeddingVectorIndexFailedException

Thrown when the database refused to remove the index.