xerj vs rag-postgres-openai-python
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.
xerj
Elasticsearch-compatible search server that auto-indexes folders for coding agents
rag-postgres-openai-python
RAG over Postgres table rows with hybrid search and SQL filters
Verdict
xerj ranks higher, 61 to 49. Of the 5 score parts we measure for both, xerj leads on 2, rag-postgres-openai-python on 1 and 2 are even.
- Adoptionxerj leads by 29 points, 55 to 26: a wide gap.
- FreshnessEven at 100.
- Maintenancexerj leads by 50 points, 99 to 49: a wide gap.
- Easy to runrag-postgres-openai-python leads by 16 points, 33 to 17: a wide gap.
- Agent-readyEven at 30.
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 rag-postgres-openai-python if you are
Teams whose knowledge base is structured Postgres rows
- Hybrid vector plus full-text search with RRF is implemented in SQL, not a vendor service
- Provider switch by env var: Azure OpenAI, OpenAI.com or Ollama
| What we compare | xerj | rag-postgres-openai-python |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 55, popular | 26, niche |
| Freshness | 100, active | 100, active |
| Maintenance | 99, healthy | 49, patchy |
| Easy to run | 17, hard | 33, some setup |
| Agent-ready | 30, minimal | 30, minimal |
| Facts from GitHub and the README | ||
| Stars | 5.6k | 506 |
| License | Apache-2.0 (permissive) | MIT (permissive) |
| Last commit | Oct 2026 | Oct 2026 |
| Last release | Oct 2026 | None published |
| Language | Rust | Python |
| Docker | No | No |
| GPU | Not needed | Not needed |
| arm64 or Apple Silicon | Mentioned | Not stated |
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)
rag-postgres-openai-python
A FastAPI backend and React frontend that answer chat questions about rows in a PostgreSQL table. Retrieval is hybrid (pgvector similarity plus full-text search fused with RRF), an OpenAI function call turns phrases like cheaper than 30 dollars into WHERE clauses, and it runs against Azure OpenAI, OpenAI.com or Ollama; azd deploys it to Container Apps with managed identity. For teams whose knowledge is structured rows, not documents.
Who it is for: Teams whose knowledge base is structured Postgres rows
Strengths
- Hybrid vector plus full-text search with RRF is implemented in SQL, not a vendor service
- Provider switch by env var: Azure OpenAI, OpenAI.com or Ollama
- Evaluation, safety evaluation and load-testing docs included
- Tests included; dev container and Codespaces configs
Weaknesses
- Deploy path is Azure-only (azd, Container Apps, Flexible Server)
- Local run expects Postgres 14+ with pgvector installed yourself
- Sample schema is one products table; multi-table questions need new code
- No auth in the app itself
- Python, azure-openai, openai, ollama
- Needs postgres-pgvector, azure-openai-or-openai-or-ollama, azd
- GitHub template
- env example file
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.