AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
style: cargo fmt router.rs (pre-existing drift, unrelated to this PR)
Vincenzo Lombardodef58608e505
diff --git a/engine/crates/xerj-api/src/router.rs b/engine/crates/xerj-api/src/router.rsindex 3eabc9910..5f681e88e 100644--- a/engine/crates/xerj-api/src/router.rs+++ b/engine/crates/xerj-api/src/router.rs@@ -276,9 +276,18 @@ pub fn build_es_compat_router(state: AppState) -> Router {"/_count",get(es_compat::count_docs_global).post(es_compat::count_docs_global),)- .route("/:index/_refresh", post(es_compat::refresh_index).get(es_compat::refresh_index))- .route("/:index/_analyze", post(es_compat::analyze_text).get(es_compat::analyze_text))- .route("/_analyze", post(es_compat::analyze_text_global).get(es_compat::analyze_text_global))+ .route(+ "/:index/_refresh",+ post(es_compat::refresh_index).get(es_compat::refresh_index),+ )+ .route(+ "/:index/_analyze",+ post(es_compat::analyze_text).get(es_compat::analyze_text),+ )+ .route(+ "/_analyze",+ post(es_compat::analyze_text_global).get(es_compat::analyze_text_global),+ )// ── Document operations ────────────────────────────────────────────.route("/:index/_doc", post(es_compat::index_doc_auto))// POST with an explicit id is the same index op as PUT (auto-create@@ -342,7 +351,10 @@ pub fn build_es_compat_router(state: AppState) -> Router {get(es_compat::field_caps).post(es_compat::field_caps),)// ── Multi-search ───────────────────────────────────────────────────- .route("/_msearch", post(es_compat::msearch).get(es_compat::msearch))+ .route(+ "/_msearch",+ post(es_compat::msearch).get(es_compat::msearch),+ )// Index-scoped multi-search — the path index defaults header lines// that omit `index`..route(@@ -483,9 +495,18 @@ pub fn build_es_compat_router(state: AppState) -> Router {.route("/_nodes", get(es_compat::nodes_info)).route("/_nodes/:node_id/stats", get(es_compat::node_stats_by_id))// ── Index clone / shrink / split ────────────────────────────────────- .route("/:index/_clone/:target", post(es_compat::clone_index).put(es_compat::clone_index))- .route("/:index/_shrink/:target", post(es_compat::shrink_index).put(es_compat::shrink_index))- .route("/:index/_split/:target", post(es_compat::split_index).put(es_compat::split_index))+ .route(+ "/:index/_clone/:target",+ post(es_compat::clone_index).put(es_compat::clone_index),+ )+ .route(+ "/:index/_shrink/:target",+ post(es_compat::shrink_index).put(es_compat::shrink_index),+ )+ .route(+ "/:index/_split/:target",+ post(es_compat::split_index).put(es_compat::split_index),+ )// ── Enrich Policies ─────────────────────────────────────────────────.route("/_enrich/policy/:name",