Table of Contents

Constructor SemanticEmailSearch

Namespace
MailFathom.Application.Emails.Search
Assembly
MailFathom.Application.dll

SemanticEmailSearch(IActiveEmbeddingProfileReader, IEmailVectorSearchIndexReader, IAiProviderHealthReader, TimeProvider, ITextEmbeddingGenerator?)

Initializes semantic retrieval over whatever this deployment configured.

public SemanticEmailSearch(IActiveEmbeddingProfileReader profileReader, IEmailVectorSearchIndexReader vectorSearchIndexReader, IAiProviderHealthReader providerHealthReader, TimeProvider timeProvider, ITextEmbeddingGenerator? textEmbeddingGenerator)

Parameters

profileReader IActiveEmbeddingProfileReader

Answers which vector space this instance retrieves under, if any.

vectorSearchIndexReader IEmailVectorSearchIndexReader

Ranks the eligible mail by distance from a point in that space.

providerHealthReader IAiProviderHealthReader

Answers what the last call to the embedding provider established about it.

timeProvider TimeProvider

Measures how long ago that was, which is what keeps a recorded failure from latching.

textEmbeddingGenerator ITextEmbeddingGenerator

Places a query in that space, or null when this deployment configured no embedding provider.

Remarks

The generator is the one optional dependency in the read path, and its absence is the deployment decision rather than a missing registration: the composition root registers an embedding adapter only for an instance that declared an endpoint chain, so resolving one here would make lexical-only deployments fail to start a search rather than serve it.

Exceptions

ArgumentNullException

Thrown when profileReader, vectorSearchIndexReader, providerHealthReader, or timeProvider is null.