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
fix(api): omit an unresolvable docvalue_field instead of emitting [] (#310)
xerj-org98f278bca871
diff --git a/engine/crates/xerj-api/src/es_compat.rs b/engine/crates/xerj-api/src/es_compat.rsindex dd54eeac5..21692c16e 100644--- a/engine/crates/xerj-api/src/es_compat.rs+++ b/engine/crates/xerj-api/src/es_compat.rs@@ -34424,8 +34424,18 @@ pub(crate) fn build_docvalue_fields(} else {arr};+ // A field that resolves to NO values is omitted, never emitted as a bare+ // `[]` (#310): `{"body_vector": []}` is a positive claim that the doc has+ // no values for that field. ES omits an unresolvable `docvalue_fields`+ // entry entirely (mirrors the `fields` builder's `None => continue`).+ if formatted.is_empty() {+ continue;+ }map.insert(field_name.to_string(), Value::Array(formatted));}+ if map.is_empty() {+ return None;+ }Some(map)}