Skip to content

sonic

Lightweight Rust search index server that returns IDs for your own database

Weak copyleft (OSI) · MPL-2.0
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

74

Health

Active

Overview

Stars

21,389

Last commit

24 days ago

Oct 2026

Repository age

7 years

since Feb 2019

Latest version

v1.10.2

Oct 2026

Contributors

–

4 active in 90 days

Releases

14

last 12 months

Docker pulls

3.6M

valeriansaliou/sonic

Language

Rust

Sonic is a schema-less search backend written in Rust. You push search text and identifier tuples into it, then query it and get back identifiers. It does not store the original text. You resolve the IDs against your own database to fetch the documents.

Terms are kept in collections, split into buckets, so you can use one bucket per user to keep indexes separate. Sonic corrects typos when exact matches are scarce, normalizes natural-language queries, and suggests completions from a word graph. You can insert and remove items in the index.

The maintainers describe it as using about 30 MB of RAM under load, with query responses in the microsecond range. It runs on Linux and macOS, and a Docker image is available. It is licensed under MPL-2.0. The master branch is limited to bug fixes while work goes into a v2 branch, which is planned to add BM25 scoring and snippet retrieval. It can stand in for a heavier engine like Elasticsearch when you only need ID lookups.

Who it's for

Developers adding search to a small app or helpdesk

It handles typos and autocomplete with a small memory footprint.

Skip if: You need to store and highlight full documents in the search engine.

Teams running search on a small, cheap server

It uses around 30 MB of RAM under load and has a low CPU footprint.

Skip if: You need relevance scoring like BM25 now, which is planned for v2.

Multi-tenant platforms

Buckets let you keep a separate index per user.

Skip if: You want a hosted search API without running a server.

The problem it solves

Full search engines like Elasticsearch can be heavy to run when all you need is fast lookups over your own records. Sonic indexes words and returns IDs, so you keep your data in the database you already have.

Strengths

  • About 30 MB RAM under load, per the maintainers' benchmarks
  • Typo correction and query autocompletion
  • Collections and buckets for per-user indexes
  • Docker image with over 3.5 million pulls
  • Written in Rust and licensed under MPL-2.0

Trade-offs

  • Returns IDs only; you need an external database for documents
  • Master branch gets bug fixes only while v2 is developed
  • No BM25 scoring or snippets until v2
  • Outside contributions are limited for now

Self-host sonic

Self-hostable
Yes
Docker image
valeriansaliou/sonic

Frequently asked questions

Is Sonic free?

Yes. It is open source under MPL-2.0.

Can I self-host it?

Yes. You run it as your own server, from a build or a Docker image.

Does it store my documents?

No. It stores a word index and returns identifiers that you resolve in your own database.

Can it replace Elasticsearch?

In some use cases, yes. It suits simple search with typo correction and autocomplete, not full document search.

Similar tools in Site search engines

MeiliSearch

Site search engines

Typo-tolerant full-text and hybrid search engine for apps and sites, self-hosted or

60k 2.8k yesterday Thriving MIT

Replaces Algolia

ElasticSearch

Site search engines

Distributed search, analytics and vector engine for teams running their own cluster

79k 26k today Thriving AGPL-3.0 OR SSPL-1.0 OR Elastic-2.0

Replaces Splunk

OpenSearch

Site search engines

Apache-licensed search and analytics suite forked from Elasticsearch

14k 3k today Thriving Apache-2.0

Replaces Splunk

Manticore Search

Site search engines

Fast SQL-based search database for full-text, vector and hybrid search

12k 654 today Thriving GPL-3.0

Typesense

Site search engines

Self-hosted, typo-tolerant search engine with vector search for sites and apps

27k 1k yesterday Active GPL-3.0

Replaces Algolia

SearXNG

Site search engines

Self-hosted metasearch engine that queries other engines without tracking you

40k 3.6k yesterday Active AGPL-3.0

Replaces Bing