Table of Contents

Class EmailSearchSnippetBounds

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

How much of a message's body one search result may show.

public sealed record EmailSearchSnippetBounds : IEquatable<EmailSearchSnippetBounds>
Inheritance
EmailSearchSnippetBounds
Implements
Inherited Members

Remarks

Snippets are where search meets mail content, so this is the data-minimization boundary of the whole use case: a result publishes several bounded extracts around the words that matched, never the body they came from. Without the bound a search would be a way to read every message that matches a common word, which is not what a caller asked for and not what the retention and access design assumes a search does.

The bounds are deployment configuration rather than request input. A caller who could raise them could lift the control that limits how much mail one query draws out, and the useful values depend on how a deployment's mail is written rather than on what any single request wants.

Fields

MaximumCharactersPerWord

The most characters one word is allowed to contribute before an extract is cut short.

MaximumSnippetsPerEmail

The greatest number of extracts one result may carry.

MaximumWordsPerSnippet

The greatest number of words one extract may carry.

MinimumWordsPerSnippet

The fewest words one extract may carry, which is also the floor WordsPerSnippet is validated against.

Properties

Default

Gets the bounds a deployment that configures none receives.

MaximumCharacters

Gets the most characters one extract may carry, whatever those words turn out to be made of.

SnippetsPerEmail

Gets how many extracts one result may carry.

WordsPerSnippet

Gets how many words one extract may carry.

Methods

Create(int, int)

Creates bounds from what a deployment configured.

ToString()

Returns a string that represents the current object.