Table of Contents

Method BeginSearchRanking

Namespace
MailFathom.Application.Observability
Assembly
MailFathom.Application.dll

BeginSearchRanking(CancellationToken)

Opens the report of the ranking one search runs, beneath the span of the search itself.

IMailboxReadScope BeginSearchRanking(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The caller's token, read as the scope is disposed to tell a caller that walked away from a ranking that broke.

Returns

IMailboxReadScope

The scope, which the caller must dispose exactly once and which the ranking must be conducted inside.

Remarks

The ends of a ranking are already spanned by the libraries they run through — the provider call by the AI instrumentation, the queries by the database one — and neither says what the ranking as a whole cost. That is the gap this closes: a search that spent its time in neither the model nor the database is still attributable, and the fusion of two rankings becomes measurable rather than being inferred from the difference.

The count this scope is completed with is deliberately not the one Completed(int) documents for a read. A read reports what it returned; a ranking reports what it scored, which is deeper than the window by the depth a fusion needs. Reporting the window here would publish a number that never differs from the one on the read above, and the pair is the whole point: side by side they separate a slow fusion from a wide one.