Skip to content

Add optional Milvus vector store backend - #77

Open
zc277584121 wants to merge 2 commits into
aiming-lab:mainfrom
zc277584121:feat/milvus-vector-store-backend
Open

Add optional Milvus vector store backend#77
zc277584121 wants to merge 2 commits into
aiming-lab:mainfrom
zc277584121:feat/milvus-vector-store-backend

Conversation

@zc277584121

@zc277584121 zc277584121 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional MilvusVectorStoreBackend implemented with MilvusClient
  • support dense search, native BM25 full-text search, structured metadata filters, schema reuse validation, and lifecycle operations
  • preserve the ascending semantic-distance and descending keyword-score contracts across Milvus Lite, Milvus Server, and Zilliz Cloud
  • keep LanceDB as the default and expose Milvus through the milvus installation extra and documented URI/token settings

Usage

pip install -e ".[milvus]"
store = VectorStore(
    backend_factory=lambda dimension: MilvusVectorStoreBackend(
        collection_name="memory_entries",
        vector_dimension=dimension,
        uri="./milvus.db",
    )
)

The same backend accepts a Milvus Server or Zilliz Cloud endpoint through MILVUS_URI and MILVUS_TOKEN.

Validation

  • python -m pytest -q tests/test_vector_store_backend.py tests/test_milvus_vector_store_backend.py (16 passed)
  • focused Ruff lint and format checks
  • git diff --check
  • Milvus Lite provider coverage for all retrieval paths, score ordering, safe filters, schema reuse, dimension mismatch, lifecycle operations, and hybrid retrieval
  • Zilliz Cloud smoke test with a unique temporary collection and cleanup

No breaking changes; the default LanceDB path is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant