Table of Contents

Interface IEmailSearchIndexReader

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

Reads one bounded, ranked window of locally stored emails out of the lexical index.

public interface IEmailSearchIndexReader

Remarks

The port is read-only and joins no transaction, per ADR 0001: it takes no persistence session, because a read has nothing to participate in.

It is separate from IStoredEmailTimelineReader because it reads a different table for a different order. The timeline reads mail metadata in a keyset order over a total ordering; this reads the derived search documents in relevance order, which has no total ordering of its own and no cursor into it.

Two obligations belong to every implementation rather than to its callers. The query text reaches the database as a parameter and never as concatenated SQL, and the text search configuration is the deployment's validated setting rather than anything the request carried. Both are what keep a caller's operators and metacharacters data instead of syntax, and neither can be checked from the application side, which is why the assertion that proves them lives where the generated command is observable.

Methods

ReadRankedMatchesAsync(MailboxEmailSelection, EmailSearchQueryText, EmailSearchSnippetBounds, int, CancellationToken)

Reads the highest-ranked emails matching a query, among those the structured filters select.