Skip to content

feat(search): index media, stickers, polls and more message types#6710

Open
stefanceriu wants to merge 1 commit into
mainfrom
stefan/searchIndexMoreMessageTypes
Open

feat(search): index media, stickers, polls and more message types#6710
stefanceriu wants to merge 1 commit into
mainfrom
stefan/searchIndexMoreMessageTypes

Conversation

@stefanceriu

@stefanceriu stefanceriu commented Jul 1, 2026

Copy link
Copy Markdown
Member

Previously the search index only handled plain-text m.room.message events; everything else hit MessageTypeNotSupported and was silently dropped.

This decouples the index from ruma event types and broadens coverage with the search crate now being content-agnostic. RoomIndexOperation::Add/Edit carry a new IndexableEvent instead of OriginalSyncRoomMessageEvent and make_doc builds a document straight from that struct. The logic for extracting the text from the messages is now within the main SDK crate.

Types added:

  • Image, Video, Audio and File for filename + caption
  • Emote, Notice and ServerNotice for body
  • Location for description
  • Sticker for Sticker and alt text
  • and finally Polls for question and answers
  • I've documented the public API changes in the appropriate changelog files (see [Writing changelog entries][pull-request-template-changelog]).
  • This PR was made with the help of AI.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.59259% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.94%. Comparing base (97380ac) to head (30c30ff).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/search_index/mod.rs 92.26% 9 Missing and 6 partials ⚠️
crates/matrix-sdk-search/src/index/mod.rs 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6710      +/-   ##
==========================================
+ Coverage   89.91%   89.94%   +0.02%     
==========================================
  Files         396      396              
  Lines      110609   110800     +191     
  Branches   110609   110800     +191     
==========================================
+ Hits        99454    99656     +202     
+ Misses       7378     7360      -18     
- Partials     3777     3784       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codspeed-hq

codspeed-hq Bot commented Jul 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing stefan/searchIndexMoreMessageTypes (30c30ff) with main (805f981)

Open in CodSpeed

Previously the search index only handled plain-text `m.room.message` events and
everything else hit `MessageTypeNotSupported` and was silently dropped.

This decouples the index from Ruma event types and broadens coverage with the
search crate now being content-agnostic. `RoomIndexOperation::Add/Edit` carry a
new `IndexableEvent` instead of `OriginalSyncRoomMessageEvent` and `make_doc`
builds a document straight from that struct. The logic for extracting the text
from the messages is now within the main SDK crate.

Types added:
* Image, Video, Audio and File for filename + caption
* Emote, Notice and ServerNotice for body
* Location for description
* Sticker for Sticker and alt text
* and finally Polls for question and answers
@stefanceriu stefanceriu force-pushed the stefan/searchIndexMoreMessageTypes branch from 163fcbe to 30c30ff Compare July 1, 2026 15:12
@stefanceriu stefanceriu marked this pull request as ready for review July 1, 2026 15:32
@stefanceriu stefanceriu requested a review from a team as a code owner July 1, 2026 15:32
@stefanceriu stefanceriu requested review from Hywan and removed request for a team July 1, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant