Class MailSearchBrowser
- Namespace
- MailFathom.Application.Emails.BrowseSearch
- Assembly
- MailFathom.Application.dll
Searches the user's mail by words and by meaning at once, and pages through what the ranking produced.
public sealed class MailSearchBrowser
- Inheritance
-
MailSearchBrowser
- Inherited Members
Remarks
It is the search a screen is drawn from, beside MailboxSearchReader, which is the one a tool calls. The two share the scope, the filters, both rankings, the fusion, and the body extracts — a search and a search are the same question over the same mail — and differ in the two things a screen needs and a tool does not: the results continue past the first window, and each one says why it is in the list.
What a query matched inside an attached file is published here as it is to a tool, through the same step: a result names the file, the place inside it, and whether the words are the document's own or a model's account of a picture. It is the answer to a result a screen could otherwise not explain — a message whose only claim on the query is a word inside a document carries no snippet, because the body extract it would quote has no highlight in it, and a row with nothing under it reads as unexplained rather than as a match inside a file.
A message a description of a picture alone placed sits below every message a query word or a written passage reached, and says so on the result. That floor is HybridSearchRanking's rather than this use case's, because ADR 0030 requires one step every surface calls instead of a rule each of them remembers.
The filters constrain and never rank. RankedSearchList carries them into both rankings as the predicate each one selects under, so a message outside the sender, the range, the folder, the flags, or the attachment state a person asked for is absent from the ranked list rather than pushed down it — and because the predicate is inside the bounded query rather than applied to what came back, a message the filters admit is never lost to a limit spent on messages they exclude.
Paging is a keyset walk of a list of fixed depth. Every page ranks the same two hundred candidates and hands back the results ordered after the cursor's place, so a page costs the same wherever in the list it is asked for, and the sequence a client walks is one sequence rather than a series of differently-deep re-rankings. RankedSearchCursor states what a ranked boundary can and cannot promise.
A query that matched nothing returns an empty page. Nothing here widens a search that found nothing, because the nearest unmatched messages are exactly what somebody must not be handed while believing they matched.
It reaches no mail server. A page answers from what synchronization has already stored and what extraction has
already indexed, so no request from a browser can wait on IMAP and none can set the remote \Seen flag.
A page is one of the points mail content leaves this deployment, and it publishes more of a message than a tool window does, so where a sensitive-content scanner is switched on the subject, the sender's display name, the preview and every extract are scanned before the page is returned; a scanner that cannot answer refuses the page rather than serving it unscanned.
Constructors
Methods
- SearchPageAsync(BrowseSearchRequest, CancellationToken)
Reads one page of the ranked results.