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(semantic): scope passage reload guard before await
buger9193ae16e59e
diff --git a/engine/crates/xerj-engine/src/index.rs b/engine/crates/xerj-engine/src/index.rsindex 6c14be5fd..a28fcbeb5 100644--- a/engine/crates/xerj-engine/src/index.rs+++ b/engine/crates/xerj-engine/src/index.rs@@ -9257,12 +9257,13 @@ impl Index {let schema = self.schema.read().await;passage_scored_vector_fields(&schema.schema)};- let mut passage_fields = self.passage_chunk_fields.write().unwrap();- match loaded.passage_chunk_fields {- Some(fields) => passage_fields.extend(fields),- None => passage_fields.extend(passage_scored_fields),+ {+ let mut passage_fields = self.passage_chunk_fields.write().unwrap();+ match loaded.passage_chunk_fields {+ Some(fields) => passage_fields.extend(fields),+ None => passage_fields.extend(passage_scored_fields),+ }}- drop(passage_fields);self.hnsw_stale.store(stale, std::sync::atomic::Ordering::Release);let nodes = loaded.graph.len();