Key features
- Quantization: Scalar (4x) or binary (32x) memory reduction
- MMR diversity: Balance relevance with result diversity
- Tenant optimization: Efficient filtering for high-cardinality tenants (Qdrant 1.16+)
- Named vectors: Multiple vector spaces per collection
- gRPC protocol: Lower latency than HTTP
- Hybrid search: RRF fusion of dense and sparse vectors
Installation
Connection
Qdrant Cloud
Self-hosted Qdrant
From config file
configs/qdrant.yaml
Collection creation
Basic collection
With sparse vectors for hybrid search
With scalar quantization
Reduces memory usage by 4x with minimal accuracy loss:With binary quantization
Reduces memory usage by 32x (best for high-dimensional vectors):Recreate collection
Payload indexing
Basic payload index
Tenant optimization index
Critical for multi-tenant performance (Qdrant 1.16+):The
is_tenant=True flag enables specialized indexing for high-cardinality tenant filtering, dramatically improving query performance in multi-tenant scenarios.Indexing documents
From Haystack documents
With sparse embeddings
Searching
Dense vector search
Hybrid search with RRF
MMR for diverse results
Maximal Marginal Relevance balances relevance with diversity:- Summarization tasks (avoid redundant content)
- Exploratory search (cover multiple aspects)
- Recommendation diversity
Metadata filtering
Supported filter operators
$eq: Equal to$ne: Not equal to$gt: Greater than$gte: Greater than or equal$lt: Less than$lte: Less than or equal$in: Value in list$nin: Value not in list
Multi-tenancy
Setup tenant isolation
Tiered tenant promotion
Qdrant’s payload-based filtering allows flexible tenant strategies:Deleting documents
Delete by tenant
Delete by filter
Building filters
Advanced features
Named vectors
Store multiple vector types in one collection:Custom vector names
Best practices
Choose the right quantization
Choose the right quantization
Balance memory reduction with accuracy requirements:
Tenant index is critical
Tenant index is critical
Always create a tenant index before multi-tenant workloads:
Use gRPC for production
Use gRPC for production
gRPC provides better throughput than HTTP:
MMR diversity tuning
MMR diversity tuning
Adjust lambda based on use case:
Error handling
Source reference
Implementation:src/vectordb/databases/qdrant.py
Key classes and methods:
QdrantVectorDB.__init__(): src/vectordb/databases/qdrant.py:114create_collection(): src/vectordb/databases/qdrant.py:185create_payload_index(): src/vectordb/databases/qdrant.py:288create_namespace_index(): src/vectordb/databases/qdrant.py:347index_documents(): src/vectordb/databases/qdrant.py:390search(): src/vectordb/databases/qdrant.py:467_mmr_rerank(): src/vectordb/databases/qdrant.py:662