Fast, lightweight, schema-less search backend
open sourceMPL-2.0self-hostablefree
Sonic is a fast, lightweight, schema-less search backend written in Rust: a simple alternative to Elasticsearch for some uses. It's an identifier index rather than a document index: you push text with an object's id, and a query returns matching ids that you look up in your own database. It answers queries in microseconds using about 30 MB of RAM, corrects typos, auto-completes words, removes stop words in 80+ languages, and organizes terms in collections and buckets (one per user, if you like). Apps talk to it over its own lightweight protocol, Sonic Channel, through libraries for many languages. Crisp runs all of its search on it. The master branch takes bug fixes only while a v2 with terabyte-scale storage, BM25 scoring and snippets is built.
Problems it solves
- add search to my app without running Elasticsearch
- a search backend that runs in 30 MB of RAM on a small server
- search-as-you-type autocomplete with typo correction for my app
- index messages and contacts per user and return matching ids
Features
- returns object ids, not documents
- typo correction
- word auto-complete (suggest)
- stop-word removal in 80+ languages
- collections and buckets
- Sonic Channel protocol with client libraries
- about 30 MB RAM under load
Limitations
- Stores only identifiers, so results must be looked up in your own database1
Capabilities
| Has an API | plan not known |
|---|
What people say
- Crisp uses Sonic for all of its search, indexing half a billion objects on a $5 a month server (as of 2019). source
Alternatives
The same job
These do what Sonic does.
- Meilisearch A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow
- Typesense Cutting-edge, in-memory search engine for mere mortals. Knowledge of rocket science optional
- Elasticsearch Open source search, analytics, and AI platform
- ZincSearch A lightweight alternative to Elasticsearch that requires minimal resources, written in Go
- Manticore Search Fast open source search database for full-text, vector and hybrid search, an Elasticsearch alternative
- ParadeDB Postgres for full-text search, vector retrieval and aggregations, as an extension (pg_search)
