Sonic logo

Sonic

Schema-less search backend that returns identifiers through a lightweight TCP protocol

Repository activity
  • Stars21.3k
  • Forks616
  • Open Issues67
License

MPL-2.0

Languages
  • Rust
  • Shell
  • JavaScript
Sonic screenshot

About Sonic

Sonic is a fast, lightweight, schema-less search backend for indexing search text and identifier tuples. It can be used as a simple alternative to Elasticsearch in some use cases, returning IDs that your application resolves from an external database instead of storing full documents.

Search terms are stored in collections and buckets. Sonic supports push, pop, collection flush, bucket flush, natural language normalization, typo correction, and real-time word auto-complete through the suggest operation. It is Unicode-compatible across 80+ spoken languages and removes stop words after guessing text language.

Sonic is built in Rust and runs as a server reached through Sonic Channel, a TCP-based protocol with no HTTP endpoint. Installation options include releases, cargo install, Debian-based packages, and Docker. A non-official Homebrew formula is available for macOS.

Key features

  • Identifier index that returns IDs for external database lookup
  • Collections and buckets for separate search indexes
  • Typo correction when exact-match results are not enough
  • Real-time word auto-complete through the suggest operation
  • Sonic Channel TCP protocol for search, ingestion, and admin actions

Details

First released
2019
Self-hosting
Run as a Sonic server
Protocol
Sonic Channel over TCP
Index model
Identifier index, not documents
Languages
Unicode · 80+ languages
Runtime
Rust