Search that is never behind.
Rows in, documents out, within about a second — no nightly re-index, no dual writes from the application, no indexing pipeline to run.
The problem
Search indexes drift: the application writes the database and then the index, one of them fails, and the index is wrong until the next full rebuild. Rebuilds are slow, and meanwhile users search for things that are not there or find things that are gone.
How it works with Waltail
The four search sinks — Elasticsearch, OpenSearch, Typesense and Meilisearch — turn each change into an upsert or delete keyed by the row's primary key. Batches go through each product's bulk API, and runs of upserts and deletes are flushed in order so a delete never overtakes the update before it. The index is an exact, slightly delayed mirror of the table.
What to watch
- The document is the row's
dataas-is. Shape the table (or a view-backed table) the way you want the document. - Create the index or collection with your mapping first if you need more than dynamic mapping.
- Seed the index with a backfill: pick the tables, confirm the estimate, and the current rows arrive through the same sink as
readevents, interleaved correctly with live changes.
Sinks for this
Elasticsearch
Bulk upsert and delete
OpenSearch
Bulk upsert and delete
Typesense
Upsert import, id from PK
Meilisearch
Documents API, id from PK
Questions
Can I index a join of several tables?
Not directly — each table maps to documents by its own primary key. Denormalise into one table or materialised table and stream that.