Class EmailTextChunk
- Namespace
- MailFathom.Application.Emails.Chunking
- Assembly
- MailFathom.Application.dll
One retrievable passage of a message, and the span of the extracted text it was cut from.
public sealed record EmailTextChunk : IEquatable<EmailTextChunk>
- Inheritance
-
EmailTextChunk
- Implements
- Inherited Members
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.
Constructors
- EmailTextChunk(int, int, string, EmailChunkContentHash, int, bool)
One retrievable passage of a message, and the span of the extracted text it was cut from.
Properties
- ContentHash
What identifies this text under the rules that produced it.
- EndOffset
Gets where the chunk ends in the extracted text it was cut from, one past its last character.
- IsDerivedFromLossyHtml
Whether the text was inferred from markup rather than read from a plain-text part.
- Ordinal
The chunk's position in its message, counted from zero in reading order.
- RuleSetVersion
The version of the rules that produced it, copied so a backfill can select on it.
- StartOffset
Where the chunk begins in the extracted text it was cut from.
- Text
The passage itself.