Special Thanks
Special thanks to @henry201605 for implementing MilvusGraphStorage, BM25 hybrid search, and consolidation integration across two thorough review rounds, and to @zc277584121 (Cheney Zhang) for expert Zilliz Cloud verification that caught three critical Milvus Lite vs remote schema incompatibilities — without which the graph collection would have failed on Zilliz Cloud deployments.
What's New
MilvusGraphStorage (PR #762)
Full knowledge-graph support for the Milvus backend, bringing it to feature parity with SQLite-vec:
- New
MilvusGraphStorageclass (~760 lines) insrc/mcp_memory_service/storage/milvus_graph.py - Dedicated
{collection}_graphMilvus scalar collection with deterministic SHA-256 edge IDs (sha256(f"{src}:{tgt}")— 64-char fixed length) - Application-layer BFS for
find_connected,shortest_path, andget_subgraph - Zilliz Cloud-compatible schema:
_dummy_vecfield (dim=2,[0.0, 0.0]) satisfies Zilliz's requirement of at least one vector field per collection - Full CRUD:
add_association,remove_association, upsert semantics
BM25 Hybrid Search (PR #762)
- Milvus 2.5+ deployments now use combined vector + BM25 keyword search via
RRFRanker - BM25 function index on
contentfield withenable_analyzer=True(required for Zilliz Cloud) - Pre-existing collections without a
sparse_vectorfield automatically fall back to vector-only search — zero migration required - Schema-level regression test (
test_bm25_content_field_has_enable_analyzer) guards the flag going forward
Consolidation Integration (PR #762)
DreamInspiredConsolidatornow detects Milvus backends and initializesMilvusGraphStoragevia lazy async init guarded byasyncio.Lock- Prevents races when consolidation cycles overlap
- Automatic relationship inference during consolidation now works end-to-end for Milvus deployments
Test Coverage
- 25 unit tests in
tests/test_milvus_graph.pycoveringMilvusGraphStoragein isolation TestRealContentHashes(5 tests) — store/retrieve/delete with 64-char SHA-256 hashesTestRemoteMilvusCompat(env-gated viaMILVUS_TEST_URI) — schema validation against real Milvus / Zilliz Cloudtest_bm25_content_field_has_enable_analyzer— schema-level BM25 regression test- Total: ~1,722 tests (+30 from this release)
Backward Compatibility
Fully additive. SQLite-vec, Hybrid, and Cloudflare backends are unchanged. Pre-existing Milvus collections without the sparse_vector field automatically fall back to vector-only search.
Files Changed
- New:
src/mcp_memory_service/storage/milvus_graph.py,tests/test_milvus_graph.py - Modified:
storage/milvus.py,consolidation/consolidator.py,mcp_server.py,server/handlers/graph.py,pyproject.toml,.coveragerc,CHANGELOG.md
See CHANGELOG.md for full details.