Sonic indexes search text with object IDs and returns matches in microseconds. It normalizes queries, corrects typos, and suggests completions over a custom TCP protocol.
Overview
Sonic is a schema-less search backend that stores normalized terms linked to identifiers rather than full documents. Applications push text and IDs, query for matching IDs, and resolve rich records from their own database, keeping Sonic a compact word index with a graph for completions. Sonic is undergoing a major rework and accepts only bug fixes on the master branch.
Data is organized in buckets and collections. Ingest and delete operations can run while the server is online; a background consolidator merges changes for search visibility. The suggest command supports realtime autocomplete; fuzzy correction kicks in when exact matches are sparse.
Interaction uses the Sonic Channel TCP protocol, not HTTP, with official client libraries for several languages. Unicode text is supported across many languages, with stop-word removal after language guessing to improve relevance.
The server targets low RAM and CPU use compared with full document search platforms. It can be installed from packages, Cargo, source builds, or the published Docker image with mounted configuration and storage paths.
Key features
- Identifier-centric search index
- Sonic Channel TCP protocol
- Realtime word suggestions
- Typo-tolerant query correction
- Bucket and collection layout
- Online ingest and delete
- Multilingual stop-word handling
- Docker and Debian packages
Use cases
- In-app message or article search
- Lightweight Elasticsearch alternative
- Autocomplete on large word indexes
- External DB search ID resolution
- Multi-tenant search buckets