Skip to main content
Qdrant is a high-performance vector database optimized for production RAG pipelines. It features scalar and binary quantization for memory efficiency, payload-based multi-tenancy with tenant optimization, and Maximal Marginal Relevance (MMR) for diverse results.

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 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

Hybrid search with RRF

MMR for diverse results

Maximal Marginal Relevance balances relevance with diversity:
MMR is ideal for:
  • 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

Always provide a scope or filter to avoid accidentally deleting all documents.

Building filters

Advanced features

Named vectors

Store multiple vector types in one collection:

Custom vector names

Best practices

Balance memory reduction with accuracy requirements:
Always create a tenant index before multi-tenant workloads:
gRPC provides better throughput than HTTP:
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:114
  • create_collection(): src/vectordb/databases/qdrant.py:185
  • create_payload_index(): src/vectordb/databases/qdrant.py:288
  • create_namespace_index(): src/vectordb/databases/qdrant.py:347
  • index_documents(): src/vectordb/databases/qdrant.py:390
  • search(): src/vectordb/databases/qdrant.py:467
  • _mmr_rerank(): src/vectordb/databases/qdrant.py:662