sonic vs xberg
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.
sonic
Lightweight schema-less search index that returns object IDs, written in Rust
xberg
Rust document extraction engine with OCR, tables and 15 language bindings
Verdict
sonic ranks higher, 83 to 82. Of the 4 score parts we measure for both, sonic leads on 1, xberg on 1 and 2 are even.
- Adoptionsonic leads by 15 points, 90 to 75: a wide gap.
- FreshnessEven at 100.
- Maintenancexberg leads by 12 points, 99 to 87.
- Agent-readyEven at 0.
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
Pick xberg if you are
Developers feeding documents into RAG or extraction pipelines in any language
- 107 formats, including nested archives guarded by zip-bomb and depth limits
- OCR via Tesseract, PaddleOCR, Candle or VLM backends with fallback chains
| What we compare | sonic | xberg |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 90, widely used | 75, popular |
| Freshness | 100, active | 100, active |
| Maintenance | 87, healthy | 99, healthy |
| Agent-ready | 0, none | 0, none |
| Facts from GitHub and the README | ||
| Stars | 21.4k | 9.6k |
| License | MPL-2.0 (copyleft) | MIT (permissive) |
| Last commit | Oct 2026 | Nov 2026 |
| Last release | Oct 2026 | Nov 2026 |
| Language | Rust | Rust |
| Docker | Yes | Yes |
| GPU | Not needed | Optional |
| arm64 or Apple Silicon | Mentioned | Mentioned |
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
xberg
Xberg is a Rust engine that detects and reads 107 document formats (PDF, Office, images, email, archives, audio, URLs, source code) and returns text, tables, metadata or schema-driven JSON. It adds OCR backends, layout and table models, chunking and embeddings, and runs as a library, a 14-command CLI, a REST server or an MCP server. It is the v1 rebrand of Kreuzberg.
Who it is for: Developers feeding documents into RAG or extraction pipelines in any language
Strengths
- 107 formats, including nested archives guarded by zip-bomb and depth limits
- OCR via Tesseract, PaddleOCR, Candle or VLM backends with fallback chains
- Bindings for 15 languages plus CLI, REST (`xberg serve`) and MCP stdio server
- MIT license; CPU by default, no GPU required, with content-hash caching
Weaknesses
- URL ingestion, transcription and reranker need Cargo features in from-source builds
- Structured extraction needs an external LLM such as Ollama, vLLM or a hosted API
- v1 rebrand of Kreuzberg; migration path from the old package is not described
- Bindings are generated by alef, so each language package depends on that toolchain
- Rust, Whisper ONNX (tiny to large-v3), PaddleOCR, PP-DocLayout-V3, RT-DETR
- Needs Tesseract (optional OCR backend), Ollama, LM Studio, vLLM or hosted LLM (structured extraction)
- 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.