Skip to content

armgit / xerj

Public Imported from GitHub
0

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.

fix(api): satisfy clippy::collapsible_match on the ES `set` override default

xerj-org2e13f9f79707
diff --git a/engine/crates/xerj-api/src/es_compat.rs b/engine/crates/xerj-api/src/es_compat.rs
index 6515b8880..a31c67b6c 100644
--- a/engine/crates/xerj-api/src/es_compat.rs
+++ b/engine/crates/xerj-api/src/es_compat.rs
@@ -24668,9 +24668,11 @@ pub async fn put_ingest_pipeline(
// translation, where it applies to ES processors only and
// is written down explicitly instead of being a default
// two layers away.
- if !cfg.contains_key("override") {
- cfg.insert("override".to_string(), json!(true));
- }
+ //
+ // `entry(..).or_insert(..)` rather than a
+ // `contains_key` guard: an `override` the caller DID
+ // write must survive untouched, including `false`.
+ cfg.entry("override").or_insert(json!(true));
}
_ => {}
}