What is Sonic?
masterSonic is a fast, lightweight, and schema-less search backend designed for high performance. Unlike full-featured search engines like Elasticsearch, Sonic acts as an identifier index rather than a document index. It ingests search texts and identifier tuples, returning only the IDs of matched items. These IDs can then be used to retrieve the actual documents from an external database.
Key Characteristics:
- Performance: Responds to queries in the microsecond (μs) range with a low CPU footprint and minimal RAM usage (~30MB).
- Functionality: Supports natural language normalization, typo correction, and real-time auto-completion.
- Data Model: Search terms are organized into collections, which are further organized into buckets. This allows for multi-tenancy (e.g., a separate bucket per user).
- Unicode Support: Full compatibility with 80+ languages, automatically removing stop words after language detection.