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
fmt(xerj-autoindex): rustfmt the search_page tests
xerj-orgb9fea6f8a00d
diff --git a/engine/crates/xerj-autoindex/src/esclient.rs b/engine/crates/xerj-autoindex/src/esclient.rsindex c7375cc2f..14ca476eb 100644--- a/engine/crates/xerj-autoindex/src/esclient.rs+++ b/engine/crates/xerj-autoindex/src/esclient.rs@@ -2141,11 +2141,23 @@ mod tests {&serde_json::json!({"size": 1000, "sort": [{"_id": "asc"}]}),).unwrap();- assert_eq!(page.pointer("/hits/hits").unwrap().as_array().unwrap().len(), 1);+ assert_eq!(+ page.pointer("/hits/hits")+ .unwrap()+ .as_array()+ .unwrap()+ .len(),+ 1+ );let seen = seen.lock().unwrap();- assert_eq!(seen.len(), 3, "two partial answers, one retry each: {seen:?}");+ assert_eq!(+ seen.len(),+ 3,+ "two partial answers, one retry each: {seen:?}"+ );assert!(- seen.iter().all(|request| request.contains("\"timeout\":\"120s\"")),+ seen.iter()+ .all(|request| request.contains("\"timeout\":\"120s\"")),"every attempt must carry the explicit page timeout: {seen:?}");}@@ -2173,9 +2185,7 @@ mod tests {/// budget belongs to the walk that knows how slow its node is.#[test]fn search_page_keeps_a_caller_supplied_timeout() {- let (address, seen) = page_server(vec![- br#"{"timed_out":false,"hits":{"hits":[]}}"#,- ]);+ let (address, seen) = page_server(vec![br#"{"timed_out":false,"hits":{"hits":[]}}"#]);let es = Es::new(&format!("http://{address}"), None).unwrap();es.search_page("autoindex-catalog",@@ -2205,7 +2215,11 @@ mod tests {.lock().unwrap().push(String::from_utf8_lossy(&request).into_owned());- respond_status(&mut stream, "404 Not Found", br#"{"error":"index_missing"}"#);+ respond_status(+ &mut stream,+ "404 Not Found",+ br#"{"error":"index_missing"}"#,+ );});let es = Es::new(&format!("http://{address}"), None).unwrap();assert!(es