You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mailcore: full-text search indexes HTML markup of HTML bodies #1905
Found while planning #1901 (mailcore: the engine can now fetch HTML bodies with EngineOptions { body_format: BodyFormat::Html }).
The bodies_fts_ai / bodies_fts_au triggers (mailcore/src/store/schema.rs) copy bodies.content verbatim into messages_fts.body. With an Html engine most stored bodies
are HTML, so Store::search matches tag names, attribute values, URLs and <style> CSS
(font, color, div, table hit almost every message). Local html drafts already have
this today; lookxy (Text) is unaffected.
Fix idea: index a text rendering of html bodies (htmlrender already turns HTML into text).
SQLite triggers cannot call Rust unless a function is registered on the connection, so either
register a body_text() SQL function used by the triggers, or maintain messages_fts from put_body / put_fetched_body / the draft writers. The triggers are CREATE TRIGGER IF NOT EXISTS, so existing stores need a DROP/recreate migration plus a reindex of html bodies.
Source: #1901, PR #1904
Severity: minor; origin: plan v1
Activity