A Matrix message database/indexer
  • Rust 86.4%
  • JavaScript 13.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Will Hunt bccb923613
Merge pull request #208 from matrix-org/hs/fix-release-flow
Remove --publish-branch from release flow.
2026-10-06 16:18:41 +01:00
.config Use nextest for the CI test runs 2026-04-14 13:41:01 +02:00
.github/workflows Remove --publish-branch 2026-09-11 10:59:04 +01:00
data/database Allow SQLCipher to upgrade it's cipher settings 2024-06-07 14:51:35 +02:00
seshat-node build(deps): bump baseline-browser-mapping in /seshat-node (#204) 2026-09-24 13:03:26 +01:00
src Replace bitwise & with AND in event queries and respect before_limit (#209) 2026-09-28 14:09:01 +01:00
tests Fix a clippy warning 2026-07-22 12:31:10 +02:00
.gitignore chore: Ensure we only package the important bits in the node package 2026-04-13 12:56:11 +02:00
.node-version Add a CI workflow to build releases with binaries (#184) 2026-09-07 17:24:33 +01:00
.pre-commit-config.yaml Add pre-commit yaml 2022-01-18 17:42:34 +00:00
Cargo.toml 6.0.1 2026-09-11 08:53:08 +01:00
CHANGELOG.md Replace bitwise & with AND in event queries and respect before_limit (#209) 2026-09-28 14:09:01 +01:00
LICENSE chore: Add a LICENSE file 2026-07-16 11:38:58 +02:00
README.md docs: update usage example 2026-07-21 11:20:37 +02:00
RELEASING.md Add a CI workflow to build releases with binaries (#184) 2026-09-07 17:24:33 +01:00

Build Status Crates.io Documentation #seshat

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.

Usage

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 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: &Database) {
    database.commit().unwrap();
}

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();

Development

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.