xerj vs sonic

Two of the top projects in RAG and search, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.

11st of 17 in RAG and search

xerj

Elasticsearch-compatible search server that auto-indexes folders for coding agents

33rd of 17 in RAG and search

sonic

Lightweight schema-less search index that returns object IDs, written in Rust

Verdict

xerj ranks higher, 86 to 82. Of the 4 score parts we measure for both, xerj leads on 2, sonic on 1 and 1 is even.

  • Adoptionsonic leads by 4 points, 84 to 80: close to even.
  • FreshnessEven at 100.
  • Maintenancexerj leads by 8 points, 96 to 88.
  • Agent-readyxerj leads by 30 points, 30 to 0: a wide gap.

Pick xerj if you are

Developers giving coding agents local code and document search or memory

  • Single static binary, no JVM; prebuilt for Linux, macOS and Windows on x86-64 and arm64
  • Works with existing Elasticsearch clients pointed at localhost:9200; 1366/1369 ES-YAML conformance tests

Pick sonic if you are

Engineers needing a small full-text search index instead of Elasticsearch

  • README benchmark: ~28MB RAM peak and ~880μs average query on 1M messages
  • Built-in typo correction and autocomplete via the suggest operation
xerj vs sonic: score parts and facts
What we comparexerjsonic
Score parts, out of 100
Adoption80, popular84, widely used
MomentumNot scored for this kindNot scored for this kind
Freshness100, active100, active
Maintenance96, healthy88, healthy
Agent-ready30, minimal0, none
Facts from GitHub and the README
Stars18.8k21.4k
LicenseApache-2.0 (permissive)MPL-2.0 (copyleft)
Last commitNov 2026Oct 2026
Last releaseNov 2026Oct 2026
LanguageRustRust
DockerNoYes
GPUNot neededNot needed
arm64 or Apple SiliconMentionedMentioned

xerj

XERJ is a single Rust binary that speaks the Elasticsearch API. `xerj autoindex <folder>` infers datasets from code, docs, logs, PDFs, SQLite and CSV, and creates one typed index per dataset, with tree-sitter symbols and line numbers for code. It supports BM25, kNN and hybrid search, a `/_memory` agent memory API, and a `xerj mcp` stdio server exposing 13 tools. Its main pitch is cutting agent token use by retrieving passages instead of reading files.

Who it is for: Developers giving coding agents local code and document search or memory

Strengths

  • Single static binary, no JVM; prebuilt for Linux, macOS and Windows on x86-64 and arm64
  • Works with existing Elasticsearch clients pointed at localhost:9200; 1366/1369 ES-YAML conformance tests
  • Autoindex needs no schema; handles code, PDF, DOCX, XLSX, SQLite, mail and logs
  • Default lexical embedder runs offline; air-gapped deployment recipe is documented

Weaknesses

  • Token savings come from the project's own 16-run study; neutral to negative on popular libraries
  • Default embedder is lexical feature-hashing; neural mode is opt-in and downloads about 90 MB
  • `--insecure` quick start disables TLS and auth; every caller becomes a superuser
  • Optional Jev rerank sends result text to TypeSafe's servers
  • Rust, lexical embedder (default, offline), neural embedder (opt-in, ~90 MB download), Jev reranker (optional, external service)

sonic

Sonic is a Rust search backend that indexes text pushed over its Sonic Channel TCP protocol and returns identifiers, which you resolve against your own database. It supports typo correction, autocomplete suggestions, and stop-word removal for 80+ languages, storing data in RocksDB and FST files. The README reports about 30MB RAM under load and sub-millisecond queries on a 1M-message benchmark.

Who it is for: Engineers needing a small full-text search index instead of Elasticsearch

Strengths

  • README benchmark: ~28MB RAM peak and ~880μs average query on 1M messages
  • Built-in typo correction and autocomplete via the suggest operation
  • Buckets within collections allow separate per-user indexes
  • Official client libraries for NodeJS, Rust and PHP, plus many community ones

Weaknesses

  • Returns only identifiers; no document storage, so an external database is needed
  • No HTTP API; access is only through the Sonic Channel TCP protocol
  • master is bug-fix only while a v2 rework is underway
  • Pre-built packages target 64-bit Debian 12 only; no semantic or vector search
  • Rust
  • Docker

More in RAG and search

Building with these?

We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.