Method ApplyRederivedMetadataAsync
- Namespace
- MailFathom.Application.Mail.Maintenance
- Assembly
- MailFathom.Application.dll
ApplyRederivedMetadataAsync(IPersistenceSession, StoredEmailId, ExtractedEmailMetadata, CancellationToken)
Writes what re-reading one email's MIME produced onto its existing row.
Task ApplyRederivedMetadataAsync(IPersistenceSession session, StoredEmailId storedEmailId, ExtractedEmailMetadata metadata, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe explicit persistence session this write participates in.
storedEmailIdStoredEmailIdThe email being re-read.
metadataExtractedEmailMetadataWhat the MIME reader extracted.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task
A task that completes when the write has been staged.
Remarks
The row's own columns and nothing else. The search document, the passages, and the vectors are derived from the message's text, which the same immutable bytes read by the same reader produce unchanged, so rewriting them would spend a re-cut and a provider bill to arrive back where they already are — ADR 0006 makes that a deliberately confirmed act rather than something a metadata refresh performs. Text written under a sensitive-content configuration this deployment no longer runs is the one case where it does change, and the extraction backfill's rebuild already owns it.