Table of Contents

Class EmailKnowledgeQuery

Namespace
MailFathom.Application.Retrieval
Assembly
MailFathom.Application.dll

What one lookup of an answering run asks for: the text to rank against, and the narrowing written beside it.

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

Remarks

Every field here is written by a model, and the type exists so that a run can express what a caller of search_emails expresses. A question that is naturally a filter — mail from one person, mail of one week, mail that carries an attachment — is otherwise answerable only by ranking free text across the whole scope, which is the one shape lexical and vector similarity are both weakest at.

The fields are deliberately the structured filters of SearchEmailsRequest and no others. Two of that request's members are withheld rather than omitted by accident, and each for its own reason:

  • The accounts and folders are the caller's authorization, so they travel beside a query rather than inside one. A model writes queries and never its own boundary, which is what keeps the scope unreachable from anything an instruction, a retrieved message, or a tool argument can say.
  • The result count is the deployment's bound on how much mail one lookup may draw out. Exposing it would let the one party with an incentive to ask for more mail ask for more mail, so the bound is applied where the passages are built and nothing about a query can widen it.

Nothing here is validated. The values reach the same use case that validates the published tool's, so a filter this system would refuse from a caller is refused from a model in the same words and by the same code.

Properties

HasAttachments

Gets whether attachments are required, or null for either.

IsRemotelySeen

Gets the remote \Seen state to require, or null for either.

QueryText

Gets the text to rank the eligible mail against.

ReceivedBefore

Gets the exclusive end of the received range, or null for no end.

ReceivedOnOrAfter

Gets the inclusive start of the received range, or null for no start.

RecipientAddress

Gets the address a To or Cc recipient must carry, or null for any recipient.

SenderAddress

Gets the address the sender must carry, in any case, or null for any sender.

SubjectFragment

Gets the fragment the subject must contain, compared without regard to case, or null for any subject.

Methods

ForText(string)

Builds a lookup that carries text and no narrowing.