Constructor EmailTextChunk
- Namespace
- MailFathom.Application.Emails.Chunking
- Assembly
- MailFathom.Application.dll
EmailTextChunk(int, int, string, EmailChunkContentHash, int, bool)
One retrievable passage of a message, and the span of the extracted text it was cut from.
public EmailTextChunk(int Ordinal, int StartOffset, string Text, EmailChunkContentHash ContentHash, int RuleSetVersion, bool IsDerivedFromLossyHtml)
Parameters
OrdinalintThe chunk's position in its message, counted from zero in reading order.
StartOffsetintWhere the chunk begins in the extracted text it was cut from.
TextstringThe passage itself.
ContentHashEmailChunkContentHashWhat identifies this text under the rules that produced it.
RuleSetVersionintThe version of the rules that produced it, copied so a backfill can select on it.
IsDerivedFromLossyHtmlboolWhether the text was inferred from markup rather than read from a plain-text part.
Remarks
A chunk names its own span rather than only the message it belongs to, so a later citation can point at the passage that answered a question instead of at the whole message. StartOffset and the length of Text index the reading of the body named by the rules' source form, which makes the span verifiable: the same offsets applied to the same extracted text return exactly this text.
The remaining source coordinates draft section 12.1 asks a chunk to carry — the account, the folder, the sender, the recipients, the date, and the subject — are the stored email's own columns and are reached through the message a persisted chunk hangs on. They are deliberately not copied here: every one of them is mail content or personal data, and a second copy would widen the access, export, and erasure surface without answering a question the message cannot already answer.
A chunk's text is mail content. Nothing here may be written to a log, a metric, a trace, or an error message; the ordinal, the offsets, and the length are the only members safe to report.