Table of Contents

Interface IEmailAttachmentMatchReader

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

Reads what the attachments of an already ranked window contributed to it.

public interface IEmailAttachmentMatchReader

Remarks

A port of its own beside IEmailSearchIndexReader and IEmailVectorSearchIndexReader because it reads neither of the two things they rank: those decide where a message sits, and this says which file inside it the query reached and where in that file. It runs over a closed window rather than over everything eligible, so what it costs is bounded by what a caller is about to publish rather than by what the mailbox holds.

It is read-only and joins no transaction, per ADR 0001. Its filters are re-applied for the reason the window read re-applies them: the statements read different snapshots, and an attachment of a message that has left the request's scope must be absent rather than published.

The two reads are separate because the two kinds of match are found by different means and mean different things. A document's own words are matched by the query's words, exactly as a body is; a description was never matched lexically at all — ADR 0030 keeps it out of the lexical index — so what explains a depicted result is the description itself rather than an extract cut around words it need not contain.

Methods

ReadDepictedMatchesAsync(MailboxEmailSelection, EmailSearchSnippetBounds, IReadOnlyList<StoredEmailId>, CancellationToken)

Reads the descriptions of the pictures attached to messages a description alone put in a result.

ReadWrittenMatchesAsync(MailboxEmailSelection, EmailSearchQueryText, EmailSearchSnippetBounds, IReadOnlyList<StoredEmailId>, CancellationToken)

Reads the passages of document attachments the query's own words reached, inside a ranked window.