Add optional Milvus vector store backend - #77
Open
zc277584121 wants to merge 2 commits into
Open
Conversation
isc-tdyar
added a commit
to isc-tdyar/SimpleMem
that referenced
this pull request
Aug 26, 2026
…otocol (aiming-lab#76) Replace the old duck-typed PGVectorStore with PGVectorStoreBackend, which implements the VectorStoreBackend protocol introduced in aiming-lab#76 (same pattern as the Milvus backend in aiming-lab#77). - New: simplemem/core/database/pg_vector_store_backend.py Implements insert/semantic_search/keyword_search/structured_search/ count/get_all/optimize/clear against PostgreSQL + pgvector. Thread-local connections, HNSW + GIN indexes, parameterized queries only. - Updated: simplemem/core/database/__init__.py get_vector_store() wires VectorStore with a PGVectorStoreBackend factory when STORAGE_BACKEND=pgvector. PGVectorStoreBackend lazily exported. - Removed: pg_vector_store.py (old duck-typed facade) - Replaced: tests/test_pg_vector_store.py with test_pg_vector_store_backend.py 20 tests covering backend-direct and VectorStore integration paths. All skip without PG_TEST_DSN — no CI infrastructure changes needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MilvusVectorStoreBackendimplemented withMilvusClientmilvusinstallation extra and documented URI/token settingsUsage
pip install -e ".[milvus]"The same backend accepts a Milvus Server or Zilliz Cloud endpoint through
MILVUS_URIandMILVUS_TOKEN.Validation
python -m pytest -q tests/test_vector_store_backend.py tests/test_milvus_vector_store_backend.py(16 passed)git diff --checkNo breaking changes; the default LanceDB path is unchanged.