Skip to content

Commit 58a3b88

Browse files
committed
feat(vectordb): add Qdrant backend support
Add Qdrant as an alternative open-source vector database backend alongside existing VikingDB/Volcengine backends. Key changes: - QdrantCollection: full VectorDBCollection implementation with support for dense/sparse hybrid search, scalar search with native order_by, full-text keyword search via payload indexes, multimodal search, aggregate data with pagination, and proper filter translation - QdrantProject: VectorDBProject implementation for collection lifecycle management with configurable distance metrics and vector dimensions - QdrantConfig: configuration model with URL, API key, gRPC, and timeout settings - Backend factory: register 'qdrant' backend type in viking_vector_index_backend.py - Auto-create TextIndex for text fields in create_index - Use FilterSelector for delete_all_data instead of drop/recreate - Paginate aggregate_data scroll to handle large collections - Track created indexes properly in has_index Dependencies: - qdrant-client >= 1.9.0 (optional extra: `pip install openviking[qdrant]`) Tests: - Comprehensive unit tests for QdrantCollection (752 lines) - Unit tests for QdrantProject (266 lines)
1 parent dc7bc95 commit 58a3b88

10 files changed

Lines changed: 4608 additions & 821 deletions

File tree

openviking/storage/vectordb/collection/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@
2626
"LocalCollection",
2727
"get_or_create_local_collection",
2828
]
29+
30+
# Optional Qdrant support (requires qdrant-client)
31+
try:
32+
from openviking.storage.vectordb.collection.qdrant_collection import (
33+
QdrantCollection,
34+
get_or_create_qdrant_collection,
35+
)
36+
__all__.extend(["QdrantCollection", "get_or_create_qdrant_collection"])
37+
except ImportError:
38+
pass # qdrant-client not installed

0 commit comments

Comments
 (0)