Class BrowsedSearchResult
- Namespace
- MailFathom.Application.Emails.BrowseSearch
- Assembly
- MailFathom.Application.dll
One result of a search, carrying what a list row draws and what says why the row is there.
public sealed record BrowsedSearchResult : IEquatable<BrowsedSearchResult>
- Inheritance
-
BrowsedSearchResult
- Implements
- Inherited Members
Remarks
The summary and the preview are the same two values a list row is drawn from, composed the same way, so a result and a row of the message list cannot come to disagree about one message and a screen can draw both from one layout. What a result adds is the pair that answers the question a list never has to: the extracts, and which ranking placed it.
The preview is here beside the extracts rather than instead of them because the two answer different questions and a result can carry either without the other. An extract shows the words that matched, which is what a person scans a result list for; the preview shows how the message opens, which is what remains to show for a message ranked by meaning. A screen leads with the extracts where there are any.
No score is published. A rank is meaningful only inside the ordering that produced it — a full-text rank, a distance, and a sum of reciprocals are three different units — so a number on a row would invite a comparison between two searches that means nothing. The order of the results is what the ranking has to say, and MatchedBy is what a person can act on.
What an attachment contributed stays out of the extracts and travels in AttachmentMatches instead. A snippet is an extract of what the message says, so quoting a file into one would report words the body never carried and leave a reader unable to say which file they came from — and a row explained by neither is exactly the unexplained result the extracts and MatchedBy exist to prevent.
IsDepictedMatch is never true of a message any word of the query or any passage somebody wrote reached, because such a message is placed by that passage and the picture contributes nothing to where it sits — which is the guarantee ADR 0030 states as a partition of the result rather than as a weight inside it.
Constructors
- BrowsedSearchResult(EmailSummary, string?, IReadOnlyList<string>, SearchMatchOrigin, IReadOnlyList<EmailAttachmentMatch>, bool)
One result of a search, carrying what a list row draws and what says why the row is there.
Properties
- AttachmentMatches
What the message's attachments contributed, each naming its file and the place inside it, and empty where the query reached none of them.
The email as every other read of this deployment describes it.
- IsDepictedMatch
Whether a model's description of an attached picture is the whole of this message's claim on the query.
- MatchedBy
Which ranking found this result.
- Snippets
The highlighted extracts around what the query matched, in the order the body carries them, and empty where the message matched by meaning or on its headers alone.