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 the RC4-W2 Stream B changes (aggs, es_compat, painless)
xerj-org37cae0c318dd
diff --git a/engine/crates/xerj-api/src/es_compat.rs b/engine/crates/xerj-api/src/es_compat.rsindex 7645dd4d6..c553a0dd5 100644--- a/engine/crates/xerj-api/src/es_compat.rs+++ b/engine/crates/xerj-api/src/es_compat.rs@@ -5795,10 +5795,7 @@ pub async fn search(.and_then(Value::as_str){if let Some(t) = types.get(f) {- local.insert(- f.to_string(),- t.clone(),- );+ local.insert(f.to_string(), t.clone());}}}diff --git a/engine/crates/xerj-engine/src/aggs.rs b/engine/crates/xerj-engine/src/aggs.rsindex df4adbf55..b773b0151 100644--- a/engine/crates/xerj-engine/src/aggs.rs+++ b/engine/crates/xerj-engine/src/aggs.rs@@ -2870,9 +2870,7 @@ pub(crate) fn apply_terms_size_pipeline<T>(match cap {Some(size) => {let mut sum_other: u64 = 0;- let shard_size = shard_size_param- .unwrap_or(size + size / 2 + 10)- .max(size);+ let shard_size = shard_size_param.unwrap_or(size + size / 2 + 10).max(size);if rows.len() > shard_size {for r in &rows[shard_size..] {sum_other += count_of(r);@@ -5981,8 +5979,13 @@ pub(crate) enum CompositeKeyKind {pub(crate) fn composite_kind_of(mapping_type: Option<&str>) -> CompositeKeyKind {match mapping_type {- Some("keyword") | Some("text") | Some("wildcard") | Some("constant_keyword")- | Some("match_only_text") | Some("ip") | Some("version") => CompositeKeyKind::Str,+ Some("keyword")+ | Some("text")+ | Some("wildcard")+ | Some("constant_keyword")+ | Some("match_only_text")+ | Some("ip")+ | Some("version") => CompositeKeyKind::Str,Some("boolean") => CompositeKeyKind::Bool,Some("long") | Some("integer") | Some("short") | Some("byte") | Some("unsigned_long") => {CompositeKeyKind::Intdiff --git a/engine/crates/xerj-engine/src/painless.rs b/engine/crates/xerj-engine/src/painless.rsindex 394024234..7da3522e1 100644--- a/engine/crates/xerj-engine/src/painless.rs+++ b/engine/crates/xerj-engine/src/painless.rs@@ -957,8 +957,7 @@ fn eval_expr(return Ok(PainlessValue::Bool(if op == "==" { eq } else { !eq }));}"<" | "<=" | ">" | ">=" if a_is_str && b_is_str => {- if let (PainlessValue::String(x), PainlessValue::String(y)) =- (&av, &bv)+ if let (PainlessValue::String(x), PainlessValue::String(y)) = (&av, &bv){let ord = x.cmp(y);let res = match op.as_str() {