Files
inbuxa-server/crates/jmap
jcoffey-dev 37da91c0a6 Sort and filter by received date on the message cache
The message cache now carries each message's received date. On an SQL
search store a full cache build reads the account's dates from the
search index in one query and the metadata of the messages the index
task has not reached yet; a refresh keeps the dates of the messages it
had and reads the metadata of the new ones, a batch at a time. With any
other search store the dates stay unknown and nothing changes.

With the dates in the cache, JMAP Email/query and IMAP SORT by received
date, Thread/get's ordering, and the before/after/since/on/older/younger
filters run on the cache. Upstream answered each of those with a query
that pulled every message id of the account from the search store in
order, with no limit, on every call.

The PostgreSQL search tables also get an (account, column) index for
each sorted column, so the sorts that still go to the database walk an
ordered index instead of sorting the account's rows.
2026-10-08 12:25:31 -07:00
..
2026-10-05 21:20:26 -07:00