#search #field #event #profile #store #load #events


A matrix message logger with full text search support

20 stable releases (3 major)

3.0.0 Apr 21, 2023
2.4.0 Apr 17, 2023
2.3.3 Jan 24, 2022
2.3.0 Jul 21, 2021
0.1.0 Aug 22, 2019

#293 in Database interfaces

Download history 266/week @ 2023-08-15 552/week @ 2023-08-22 278/week @ 2023-08-29 215/week @ 2023-09-05 255/week @ 2023-09-12 220/week @ 2023-09-19 269/week @ 2023-09-26 199/week @ 2023-10-03 260/week @ 2023-10-10 190/week @ 2023-10-17 205/week @ 2023-10-24 210/week @ 2023-10-31 173/week @ 2023-11-07 198/week @ 2023-11-14 218/week @ 2023-11-21 253/week @ 2023-11-28

862 downloads per month



Build Status Crates.io Documentation #seshat


Seshat is a database and indexer for Matrix events.

Its main use is to be used as a full text search backend for Matrix clients.

JavaScript bindings

Seshat provides JavaScript bindings which can be found in the seshat-node subdir.


There are two modes of operation for Seshat, adding live events as they come in:

use seshat::{Database, Event, Profile};
use tempfile::tempdir;

let tmpdir = tempdir().unwrap();
let mut db = Database::new(tmpdir.path()).unwrap();

/// Method to call for every live event that gets received during a sync.
fn add_live_event(event: Event, profile: Profile, database: &Database) {
    database.add_event(event, profile);
/// Method to call on every successful sync after live events were added.
fn on_sync(database: &mut Database) {

The other mode is to add events from the room history using the /room/{room_id}/messages Matrix API endpoint. This method supports storing checkpoints which remember the arguments to continue fetching events from the /room/{room_id}/messages API:

database.add_historic_events(events, old_checkpoint, new_checkpoint)?;

Once events have been added a search can be done:

let result = database.search("test", &SearchConfig::new()).unwrap();


Seshat uses standard cargo commands build and test.

You can install pre-commit and then pre-commit install to ensure your work is linted on commit.


~842K SLoC