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(autoindex): rustfmt the xerj search module (#764 CI)
xerj-orgf99d2113d87e
diff --git a/engine/crates/xerj-autoindex/src/lib.rs b/engine/crates/xerj-autoindex/src/lib.rsindex 9635ad658..c61e306b1 100644--- a/engine/crates/xerj-autoindex/src/lib.rs+++ b/engine/crates/xerj-autoindex/src/lib.rs@@ -12,7 +12,6 @@ pub mod dataset;pub mod detect;pub mod esclient;pub mod estimate;-pub mod search;pub mod extract;pub mod feedback;pub mod gate;@@ -27,6 +26,7 @@ pub mod pool;pub mod progress;mod reconcile_plan;pub mod resources;+pub mod search;pub mod sniff;pub mod state;mod sync;diff --git a/engine/crates/xerj-autoindex/src/search.rs b/engine/crates/xerj-autoindex/src/search.rsindex bf188119f..ec2fa0fbe 100644--- a/engine/crates/xerj-autoindex/src/search.rs+++ b/engine/crates/xerj-autoindex/src/search.rs@@ -33,8 +33,10 @@ EXAMPLE:/// Entry point for the `search` subcommand. Returns a process exit code.pub fn run_search_cli() -> i32 {- let mut url =- std::env::var("XERJ_URL").ok().filter(|s| !s.is_empty()).unwrap_or_default();+ let mut url = std::env::var("XERJ_URL")+ .ok()+ .filter(|s| !s.is_empty())+ .unwrap_or_default();let mut api_key = std::env::var("XERJ_API_KEY").ok().filter(|s| !s.is_empty());let mut prefix = "ax".to_string();let mut k: usize = 5;@@ -56,9 +58,7 @@ pub fn run_search_cli() -> i32 {"-k" => k = it.next().and_then(|s| s.parse().ok()).unwrap_or(k),"--full" => full = it.next().and_then(|s| s.parse().ok()).unwrap_or(full),"--json" => as_json = true,- other if !other.starts_with('-') && query.is_none() => {- query = Some(other.to_string())- }+ other if !other.starts_with('-') && query.is_none() => query = Some(other.to_string()),other => {eprintln!("xerj search: unexpected argument '{other}'\n\n{USAGE}");return 2;@@ -124,7 +124,10 @@ pub fn run_search_cli() -> i32 {};if as_json {- println!("{}", serde_json::to_string_pretty(&resp).unwrap_or_default());+ println!(+ "{}",+ serde_json::to_string_pretty(&resp).unwrap_or_default()+ );return 0;}@@ -159,6 +162,9 @@ pub fn run_search_cli() -> i32 {}}}- println!("\n{} passage(s) from '{pattern}'. Cite ax_path:line for anything you rely on.", hits.len());+ println!(+ "\n{} passage(s) from '{pattern}'. Cite ax_path:line for anything you rely on.",+ hits.len()+ );0}