Table of Contents

Method ReadWrittenMatchesAsync

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

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

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

Task<IReadOnlyList<StoredEmailAttachmentMatches>> ReadWrittenMatchesAsync(MailboxEmailSelection selection, EmailSearchQueryText queryText, EmailSearchSnippetBounds snippetBounds, IReadOnlyList<StoredEmailId> rankedEmailIds, CancellationToken cancellationToken)

Parameters

selection MailboxEmailSelection

The same filters the window was ranked under.

queryText EmailSearchQueryText

The validated free text the extracts are cut around.

snippetBounds EmailSearchSnippetBounds

How many extracts one message may show, and how long each may be.

rankedEmailIds IReadOnlyList<StoredEmailId>

The window to read, in any order.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<StoredEmailAttachmentMatches>>

One entry per message whose attachments matched, each carrying at most SnippetsPerEmail passages.

Remarks

A message whose attachments matched nothing is absent rather than present and empty, and so is an attachment MailFathom could not read — encrypted, corrupt, unsupported, carrying no text layer, or excluded by format. There is no searched-and-empty state here: what the reason was lives on the attachment's own row, which is where a user asking why is answered.

Exceptions

ArgumentNullException

Thrown when any reference argument is null.