Table of Contents

Struct EmailSearchResultLimit

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

How many ranked emails one lexical search returns.

public readonly record struct EmailSearchResultLimit : IEquatable<EmailSearchResultLimit>
Implements
Inherited Members

Remarks

A search returns a window rather than a page, and this bound is what closes it. Relevance order is not stable the way a timeline order is — indexing one new message can move every rank — so a cursor into a ranked result set would name a boundary that no longer means what it meant when it was issued. The specification states the bound instead of implying a cursor that would not be sound, and a caller who needs more than a window narrows the structured filters.

The maximum is lower than a timeline page's, because a ranked result costs more than a listed one: PostgreSQL builds a highlighted extract per row on top of matching and ranking it. It is also the bound on how much mail content one request can draw out of a mailbox, which is the reason it is a control rather than a tuning knob.

Being a struct, default is reachable and carries a value of zero, which names no window. IsSpecified reports that. Every limit a search uses arrives through Create(int) or FromRequested(int?), so the default cannot reach a query from a request.

Fields

DefaultValue

The number of results a request that names none receives.

MaximumValue

The greatest number of ranked results one search returns.

Properties

Default

Gets the limit a request that names none receives.

IsSpecified

Gets whether this value names a limit rather than the unusable struct default.

Value

Gets how many ranked results the search returns.

Methods

Create(int)

Creates a limit from what a request asked for.

FromRequested(int?)

Creates a limit from a request that may not have named one.

ToString()

Returns the fully qualified type name of this instance.