HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
valeriansaliou
sonic
Rust2019–2024
valeriansaliou / sonic

sonic

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

35Distinct people
48Mentions
0Explicit recommenders
21.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 7:27:27 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year48 dated mentions

Observed mentions: 2019-03-23 17:51:47 UTC to 2024-10-14 15:35:49 UTC.

0369122019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 11 mentions; 2 submissions, 9 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 12 mentions; 1 submissions, 11 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC1129
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC909
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC12111
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC1019
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Sonic Important📢 Heads up! Sonic is undergoing a big rework and contributions on the master branch are now bug fixes only. All of our efforts go to the v2 branch, where we are introducing long-awaited features. Sonic v2 will support Terabyte-scale ingestion/storage along with BM25 scoring and snippet retrieval (among other things). Stay tuned! Until Sonic v2 is released, don’t waste time diving into the source code of Sonic, as most of it will be completely different in v2. Outside contributions will be limited to short bug fixes until we consider Sonic stable again. Sonic is a fast, lightweight and schema-less search backend. It ingests search texts and identifier tuples that can then be queried against in a microsecond's time. Sonic can be used as a simple alternative to super-heavy and full-featured search backends such as Elasticsearch in some use-cases. It is capable of normalizing natural language search queries, auto-completing a search query and providing the most relevant results for a query. Sonic is an identifier index, rather than a document index; when queried, it returns IDs that can then be used to refer to the matched documents in an external database. A strong attention to performance and code cleanliness has been given when designing Sonic. It aims at being crash-free, super-fast and puts minimum strain on server resources (our measurements have shown that Sonic - when under load - responds to search queries in the μs range, eats ~30MB RAM and has a low CPU footprint; see our benchmarks). Tested at Rust version: rustc 1.98.0 (88d9e12ae 2026-08-18) 🇫🇷 Crafted in Nantes, France. 📰 The Sonic project was initially announced in a post on my personal journal. « Sonic » is the mascot of the Sonic project. I drew it to look like a psychedelic hipster hedgehog. Who uses it? Crisp Scrumpy 👋 You use Sonic and you want to be listed there? Contact me. Demo Sonic is integrated in all Crisp search products on the Crisp platform. It is used to index half a billion objects on a $5/mth 1-vCPU SSD cloud server (as of 2019). Crisp users use it to search in their messages, conversations, contacts, helpdesk articles and more. You can test Sonic live on: Crisp Helpdesk, and get an idea of the speed and relevance of Sonic search results. You can also test search suggestions from there: start typing at least 2 characters for a word, and get suggested a full word (press the tab key to expand suggestion). Both search and suggestions are powered by Sonic. Sonic fuzzy search in helpdesk articles at its best. Lookup for any word or group of terms, get results instantly. Features Search terms are stored in collections, organized in buckets; you may use a single bucket, or a bucket per user on your platform if you need to search in separate indexes. Search results return object identifiers, that can be resolved from an external database if you need to enrich the search results. This makes Sonic a simple word index, that points to identifier results. Sonic doesn't store any direct textual data in its index, but it still holds a word graph for auto-completion and typo corrections. Search query typos are corrected if there are not enough exact-match results for a given word in a search query, Sonic tries to correct the word and tries against alternate words. You're allowed to make mistakes when searching. Insert and remove items in the index; index-altering operations are light and can be committed to the server while it is running. A background tasker handles the job of consolidating the index so that the entries you have pushed or popped are quickly made available for search. Auto-complete any word in real-time via the suggest operation. This helps build a snappy word suggestion feature in your end-user search interface. Full Unicode compatibility on 80+ most spoken languages in the world. Sonic removes useless stop words from any text (eg. 'the' in English), after guessing the text language. This ensures any searched or ingested text is clean before it hits the index; see languages. Simple protocol (Sonic Channel), that let you search your index, manage data ingestion (push in the index, pop from the index, flush a collection, flush a bucket, etc.) and perform administrative actions. Sonic Channel was designed to be lightweight on resources and simple to integrate with; read protocol specification. Easy-to-use libraries, that let you connect to Sonic from your apps; see libraries. How to use it? Installation Sonic is built in Rust. To install it, either download a version from the Sonic releases page, use cargo install or pull the source code from master. 👉 Install from packages: Sonic provides pre-built packages for Debian-based systems (Debian, Ubuntu, etc.). Important: Sonic only provides 64 bits packages targeting Debian 12 for now (codename: bookworm). You might still be able to use them on other Debian versions, as well as Ubuntu (although they rely on a specific glibc version that might not be available on older or newer systems). First, add the Sonic APT repository (eg. for Debian bookworm): echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_sonic.list curl -fsSL https://packagecloud.io/valeriansaliou/sonic/gpgkey | gpg --dearmor -o /usr/share/keyrings/valeriansaliou_sonic.gpg apt-get update Then, install the Sonic package: apt-get install sonic Then, edit the pre-filled Sonic configuration file: nano /etc/sonic.cfg Finally, restart Sonic: service sonic restart 👉 Install from source: If you pulled the source code from Git, you can build it using cargo: cargo build --locked --release You can find the built binaries in the ./target/release directory. Install build-essential, clang, libclang-dev, libc6-dev, g++ and llvm-dev to be able to compile the required RocksDB dependency. Note that the following optional features can be enabled upon building Sonic:
Read the full README on GitHub

What Hacker News says

12 sources
There are also Toshi[1] and Sonic[2] in Rust. And Vector[3] as a Logstash alternative too. There is an issue[4] proposing to integrate Vector with Sonic and Toshi. Maybe Zinc can pursue this goal too. Always good to see people who realize that Java is unwieldy monster that will eat all your memory. Native is a way to go for big systems. [1] https://github.com/toshi-search/Toshi [2] https://github.com/valeriansaliou/sonic [3] https://vector.dev/ [4] https://github.com/vectordotdev/vector/issues/988
In Zinc Search engine. A lightweight alternative to Elasticsearch written in Go
If your dataset is small enough or you have plenty of resources, and you don’t need any fancy customizabilty and multitenancy (always searching only a subset of all documents, filtered by tenant ID) then Typesense. Otherwise if Typesense can’t fit the index in your RAM it will not work, if you need to filter every search it will become slow. If you need lots of customizability of how you index your documents and how you search, what you prioritize in the search, facets, nothing beats Elastic here. But it will need plenty of resources or otherwise it will be slow. If you need fast but absolutely non customizable search that can live off a lot less than 1GB of RAM (less than 100MBs even) then you might have some success with https://github.com/valeriansaliou/sonic If you’re constrained on resources but sonic is too limiting, then fina
Read the rest
lly you might have some success with Manticore search. It’s featureful but using it with different languages can be a lot of work (I’m not sure why they don’t ship a distribution with all language plugins enabled and configured), the docs will be good enough to get you started. It can live off a few hundred MBs of RAM with large indexes, and will still be faster than Elastic.
In Scaling Indexing and Search – Algolia New Search Architecture
If you're in the market for lightweight but fast search engines, I would recommend you take a look to typesense [1], instead; or even sonic [2], if it fits your use case. MeiliSearch does not give you anything on top of them (i.e. neither as feature complete as [1], not as fast as [2]). And I personally stopped using them after a really bad experience I had with their "developers". They don't really care about you and it shows, also, they were kind of rude when I reported some bugs to them. I moved to typesense and it's a whole different world, their creators truly enjoy that you're using their product; same thing with sonic, Valerian is the kind of hacker you'd want as a friend, super talented, super easy going, you could ask a completely dumb question on their GH and he takes the time to explain things to you at length. I know its open
Read the rest
source, I know I didn't pay a dime, but for me, that kind of attitude makes it or break it. Plus, you actually get a superior product. 1: https://typesense.org/ 2: https://github.com/valeriansaliou/sonic
In MeiliSearch: A Minimalist Full-Text Search Engine
Typesense seems like a good fully-featured alternative to Elasticsearch. I.e. it's basically a database with fuzzy-search features (schemas, fields, facets, ordering, scoring profiles, etc), and its speed is enabled by holding everything in RAM. If you just want the fuzzy-search part (query string -> list of matching document ids) and don't want to pay for GBs of RAM, sonic [1] seems to be an interesting project. It's very fast (μs) and uses very little RAM but doesn't offer DB-like features such as sorting, schemas/fields, scoring etc. It's more of a low-level primitive for building your own search feature than an integrated search db that's ready to use out of the box. [1]: https://github.com/valeriansaliou/sonic
In Fast, Open Source Search
FWIW... 1. Toshi https://github.com/toshi-search/Toshi (Rust, 3.1k stars) 2. Tantivy https://github.com/tantivy-search/tantivy (Rust, 4.5k stars) 3. PISA https://github.com/pisa-engine/pisa (C++, 486 stars) 4. Bleve https://github.com/blevesearch/bleve (Go, 7.4k stars) 5. Sonic https://github.com/valeriansaliou/sonic (Rust, 10.9k stars) 6. Partial comparison https://mosuka.github.io/search-benchmark-game/ (tantivy Vs lucene Vs pisa Vs bleve) 7. Bayard https://github.com/bayard-search/bayard (Rust, on top of Tantivy, 1.4k stars) 8. Blast https://github.com/mosuka/blast (Go, on top of Bleve, 930 stars) Algolia alternatives with some compatibility 1. MeiliSearch https://github.com/meilisearch/MeiliSearch (Rust, 12.4k stars) 2. typesense https://github.com/typesense/typesense (C++, 5.1k stars)
In ClickHouse as an alternative to Elasticsearch for log storage and analysis
I'm personally very fond of sonic [0] for full text search. > Sonic can be used as a simple alternative to super-heavy and full-featured search backends such as Elasticsearch in some use-cases. It is capable of normalizing natural language search queries, auto-completing a search query and providing the most relevant results for a query.... > When reviewing Elasticsearch (ELS) and others, we found those were full-featured heavyweight systems that did not scale well with Crisp's freemium-based cost structure. > At the end, we decided to build our own search backend, designed to be simple and lightweight on resources [0] - https://github.com/valeriansaliou/sonic
In ClickHouse as an alternative to Elasticsearch for log storage and analysis

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.