Skip to content

Search attachment names, kinds and text derived from attachments #94

Open

Description

@neoromantic

Search sees a media message only through its caption. The FTS5 files column is always empty, because nothing writes messages_cache.media_path; file names, types and sizes are only in raw_json. Text that could come from attachments (voice transcripts, PDF text, OCR) isn't searchable at all.

Proposed, together with #22:

  • Send and download media #22 adds a per-account table of attachment metadata (kind, file name, MIME type, size, duration, uniqueFileId, album ID), filled when a message is written and from raw_json for older rows (background migrations, Background, resumable migrations for big caches #89).
  • The files column indexes the file name and kind, so files:pdf and files:report work, and tg messages search can filter by attachment kind.
  • Text derived from attachments (Send and download media #22) is stored per message and kind, and indexed so that search finds it and says where the match came from.

Done when e2e tests on made-up data find a message by its file name, by its kind, and by a derived text, and docs/search.md describes it. Depends on #22.

Activity

  1. added
    enhancement
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions