Sonic

Add fast, schema-less search to your application. This lightweight backend offers typo correction and auto-completion while running on just a few megabytes of RAM.

Sonic is a fast, lightweight, and schema-less search backend designed as a simple alternative to resource-intensive systems like Elasticsearch. It is engineered for high performance, responding to queries in microseconds while consuming only a few megabytes of RAM and maintaining a low CPU footprint. This makes it an ideal choice for applications where resource efficiency is critical.

Instead of being a document index, Sonic functions as an identifier index. When you perform a query, it returns a list of object IDs that match your search terms. You can then use these IDs to retrieve the full documents from your primary database. This approach keeps the index small and fast.

Key capabilities include:

  • Typo Correction: Automatically corrects spelling mistakes in search queries if there are not enough exact matches, providing more relevant results.
  • Real-Time Suggestions: Offers an auto-complete feature to help build responsive word suggestion interfaces for your users.
  • Broad Language Support: Features full Unicode compatibility and removes common stop words for over 80 languages, ensuring clean and effective indexing.
  • Simple Integration: Uses a custom protocol, Sonic Channel, and provides official and community-built libraries for easy integration with languages like NodeJS, Python, Rust, and PHP.

Directory Structure

sonic
config
sonic.cfg
data
.env
docker-compose.yml

docker-compose.yml

services:
  sonic:
    image: valeriansaliou/sonic:latest
    container_name: sonic
    restart: unless-stopped
    ports:
      - "1491:1491"
    volumes:
      - ./config/sonic.cfg:/etc/sonic.cfg
      - ./data:/var/lib/sonic/store

.env

# Sonic uses a configuration file (sonic.cfg) for its settings and credentials (such as auth_password).
# No environment variables are required for this docker-compose.yml.

Share:

Ad
Favicon

 

  
 

Similar to Sonic

Favicon

 

  
  
Favicon

 

  
  
Favicon