Table of Contents

Interface IEmbeddingProfileVectorIndex

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

Maintains the one approximate index through which a profile's vectors are searched.

public interface IEmbeddingProfileVectorIndex

Remarks

The index belongs to a profile rather than to the table, which is a consequence of the dimensionless vector column: one index covers one width, so a table holding two generations of different widths cannot be served by a single one. That is why no migration creates it and why building it is an administrative act — activating a profile is what calls for one, and removing or superseding that profile is what calls for it to go. See ADR 0006.

Nothing here decides when to activate, and neither operation changes an answer. Before an approximate index exists, a vector search is exact: correct, and linear in the number of vectors. That is what makes both operations safe to perform after the fact and what keeps a failure to build one a performance finding rather than a wrong result.

Methods

EnsureBuiltAsync(ActiveEmbeddingProfile, CancellationToken)

Builds the approximate index for one profile, leaving an existing one in place.

RemoveAsync(EmbeddingProfileId, CancellationToken)

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