Skip to main content

Qdrant: High-Performance Vector Search Engine & Database

Qdrant is a production-grade, open-source vector search engine built in Rust for maximum performance. It supports rich payload filtering, hybrid search via sparse+dense vectors, vector quantization for cost reduction, and scales from a single Docker container to a distributed cluster. The go-to choice for teams who want performance, flexibility, and control.

✓ Payload filtering (no post-filter) ✓ Dense + sparse hybrid search ✓ Vector quantization (4–32x) ✓ gRPC + REST API ✓ Rust-powered, open source
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →

Creating a Collection & Configuring HNSW

Collections in Qdrant hold vectors and their payloads. Configure HNSW parameters and quantization at creation time.

pip install qdrant-client openai

from qdrant_client import QdrantClient
from qdrant_client.models import (
    VectorParams, Distance, HnswConfigDiff,
    ScalarQuantizationConfig, ScalarType, QuantizationConfig
)

# Connect to self-hosted or Qdrant Cloud
client = QdrantClient(url="http://localhost:6333")
# client = QdrantClient(url="https://YOUR.qdrant.io", api_key="YOUR_KEY")

# Create a collection with HNSW + scalar quantization
client.create_collection(
    collection_name="articles",
    vectors_config=VectorParams(
        size=1536,               # must match embedding model
        distance=Distance.COSINE
    ),
    hnsw_config=HnswConfigDiff(
        m=16,                    # graph connections per node (higher = better recall)
        ef_construct=200,        # build-time search width
        on_disk=False            # set True for large collections to save RAM
    ),
    quantization_config=QuantizationConfig(
        scalar=ScalarQuantizationConfig(
            type=ScalarType.INT8,   # 4x memory reduction
            quantile=0.99,
            always_ram=True         # keep quantized index in RAM for speed
        )
    )
)
print(client.get_collection("articles"))

Batch Upsert & Filtered Vector Search

Upsert vectors with payloads in batches, then search with complex payload filters.

import openai
from qdrant_client.models import PointStruct, Filter, FieldCondition, MatchValue, Range

oa = openai.OpenAI()

docs = [
    {"id": 1, "text": "RAG improves LLM accuracy with external knowledge", "category": "ai",  "year": 2024},
    {"id": 2, "text": "Qdrant supports scalar quantization",               "category": "db",  "year": 2024},
    {"id": 3, "text": "Sparse vectors enable keyword-aware search",         "category": "ai",  "year": 2023},
]

# Generate embeddings
texts = [d["text"] for d in docs]
resp = oa.embeddings.create(model="text-embedding-3-small", input=texts)
embeddings = [r.embedding for r in resp.data]

# Batch upsert
points = [
    PointStruct(
        id=d["id"],
        vector=emb,
        payload={"text": d["text"], "category": d["category"], "year": d["year"]}
    )
    for d, emb in zip(docs, embeddings)
]
client.upsert(collection_name="articles", points=points)

# Filtered search — only ai category, year >= 2024
query_vec = oa.embeddings.create(
    model="text-embedding-3-small",
    input=["how does retrieval augmented generation work"]
).data[0].embedding

results = client.search(
    collection_name="articles",
    query_vector=query_vec,
    query_filter=Filter(
        must=[
            FieldCondition(key="category", match=MatchValue(value="ai")),
            FieldCondition(key="year", range=Range(gte=2024))
        ]
    ),
    limit=3,
    with_payload=True
)
for r in results:
    print(f"score={r.score:.4f} | {r.payload['text']}")

Hybrid Search: Sparse + Dense Vectors

Combine dense semantic vectors with sparse keyword vectors in the same collection for true hybrid search.

from qdrant_client.models import (
    SparseVectorParams, SparseIndexParams,
    SparseVector, NamedSparseVector, NamedVector,
    SearchRequest, Prefetch, FusionQuery, Fusion
)

# Create collection with both dense and sparse vectors
client.create_collection(
    collection_name="hybrid_docs",
    vectors_config={"dense": VectorParams(size=1536, distance=Distance.COSINE)},
    sparse_vectors_config={"sparse": SparseVectorParams(
        index=SparseIndexParams(on_disk=False)
    )}
)

# Upsert with both vector types (sparse = BM25/SPLADE indices+values)
client.upsert(
    collection_name="hybrid_docs",
    points=[PointStruct(
        id=1,
        vector={
            "dense": dense_embedding,
            "sparse": SparseVector(indices=[42, 100, 300], values=[0.8, 0.5, 0.3])
        },
        payload={"text": "Qdrant hybrid search guide"}
    )]
)

# Hybrid query using Reciprocal Rank Fusion
results = client.query_points(
    collection_name="hybrid_docs",
    prefetch=[
        Prefetch(query=NamedVector(name="dense", vector=dense_query), limit=20),
        Prefetch(query=NamedSparseVector(name="sparse", vector=sparse_query), limit=20),
    ],
    query=FusionQuery(fusion=Fusion.RRF),   # Reciprocal Rank Fusion
    limit=5
)

Qdrant vs Pinecone vs Weaviate vs Milvus

Feature Qdrant Pinecone Weaviate Milvus
LanguageRustProprietaryGoGo + C++
QuantizationScalar/Product/BinaryNoNoYes (IVF)
Hybrid searchSparse + dense (RRF)LimitedBM25 + vectorYes
Payload filteringIn-graph (fast)YesYesYes
Open sourceYes (Apache 2.0)NoYesYes
DistributedYes (cluster mode)Yes (managed)YesYes (native)
Best forPerf + flexibilityManaged simplicityHybrid RAGBillion-scale

Frequently Asked Questions

What is Qdrant and what makes it stand out?▼

Qdrant is a high-performance, open-source vector search engine written in Rust. Its key differentiators are: rich payload (metadata) filtering with an advanced filter language, support for both dense and sparse vectors in the same collection (true hybrid search), vector quantization (scalar, product, binary) for 4–32x storage reduction, and gRPC for low-latency production APIs. It runs as a single binary, Docker container, or Kubernetes cluster.

What is payload filtering in Qdrant?▼

Qdrant attaches a JSON payload to each vector point. At search time, you can filter by any payload field using conditions like Must (AND), Should (OR), MustNot (NOT), and operators like Range, Match, IsNull, IsEmpty, and GeoRadius. Filtering is integrated into the HNSW graph traversal, not post-filtered, so it scales efficiently even with highly selective filters.

What is vector quantization in Qdrant?▼

Quantization compresses vectors to reduce memory and speed up search. Scalar quantization converts float32 to int8 (4x smaller). Product quantization uses codebook compression for even smaller size. Binary quantization converts each dimension to a single bit — up to 32x compression with ~2-5% accuracy drop. Quantization is transparent: you enable it per-collection and Qdrant handles the rest at index time.

How do sparse vectors work in Qdrant?▼

Sparse vectors (like SPLADE or BM25 term weights) have most values as zero. Qdrant stores them efficiently and can search sparse collections using dot product. By combining a dense vector collection with a sparse vector collection and using Reciprocal Rank Fusion, you get full hybrid search (semantic + keyword). This is the recommended approach for production RAG with mixed query types.

Qdrant Cloud vs self-hosted: which is better?▼

Self-hosted Qdrant is free, gives you full hardware control, and is ideal when data residency or cost-at-scale matters. Qdrant Cloud is the managed SaaS version — free tier (1GB), auto-scaling, no infra work. For teams without DevOps capacity or early-stage products, Qdrant Cloud removes friction. For >50M vectors or enterprise security requirements, self-hosted on your own VPC is more cost-effective long term.

What index types does Qdrant support?▼

Qdrant primarily uses HNSW (Hierarchical Navigable Small World) for dense vector indexing — it provides excellent recall (>0.95) with fast search. You can tune m (graph connectivity) and ef_construct (build-time accuracy) for your precision vs. speed tradeoff. Qdrant also supports flat (brute-force) indexing for small collections where exact search is needed. For sparse vectors, an inverted index is used automatically.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

CrewAI Agent Config Generator Embedding Storage Calculator Test Coverage Calculator AI Safety Checklist Generator Jotai Atom Explorer RAG Chunk Size Optimizer CSS Container Query Builder AI Agent Memory Planner AI Hallucination Detector LangChain PromptTemplate Builder MySQL Query Explainer PostgreSQL EXPLAIN Analyzer GraphQL Fragment Generator Jest Coverage Config Generator Cron Expression Explainer Font Pairing Preview AI Agent Run Cost Tracker AI Pipeline DAG Builder AI Rate Limit Calculator Prompt Injection Tester Vibe Coding Prompt Optimizer AI IDE Comparator RAG Chunking Calculator AI Commit Message Generator AI Doc Generator — Pro Tool AI Regex Explainer — Pro Tool AI System Guardian AI Token Cost Calculator LLM Cost Calculator Vitest Configuration Generator AI Prompt Cost Calculator AI Model Comparator Mermaid Diagram Generator Elasticsearch Query Tester mTLS Certificate Chain Builder AI Model Benchmark Comparator JS Prototype Chain Visualizer OpenAI Token Counter AI Model Context Window Visualizer LLM JSON Schema Builder RAG Chunking Calculator OpenAI Prompt Tester AI Model Comparison Tool Multi-Agent Orchestration Planner OpenAI Function Calling Generator Token Counter & Cost Estimator AI Model Comparison Table AI API Rate Limit Calculator LLM Prompt Template Builder HTTP Headers Analyzer AI Code Review — Pro Tool AI Error Explainer — Pro Tool AI SQL Builder — Pro Tool AI Unit Test Generator — Pro Tool Color Palette Generator Docker Compose Generator JWT Decoder Prompt Template Builder Regex Tester RSA Key Pair Generator SMTP Server Tester Biome Config Generator Terraform Variable Validator Haproxy Config Validator SBOM Generator AI Variable Namer AI PR Description Generator AI JSDoc Generator K8s Resource Limits Calculator LLM Context Window Calculator Regex Flags Explainer OAuth2 Flow Visualizer Prompt Token Estimator Jest Testing Framework Guide Vitest Guide — Vite-native Testing Playwright E2E Testing Guide Core Web Vitals Calculator LLM Prompt Cost Calculator System Prompt Builder Solana Program ID Generator Multi-Chain Wallet Address Validator LLM System Prompt Analyzer AI Embeddings Dimension Explorer Bezier Curve Editor LLM Benchmark Calculator Token Context Calculator LLM Prompt Caching Calculator AI Prompt Token Estimator AI Context Window Visualizer Embedding Similarity Calculator TypeScript Discriminated Union Builder Core Web Vitals Budget Calculator JWT Decoder & Validator Blockchain Transaction Fee Calculator Database Query Cost Analyzer

Related Articles

Apr 1, 2026 · 12 min read

Vector Database Comparison 2026: Pinecone vs Weaviate vs Qdrant vs Chroma

In-depth comparison of the top vector databases in 2026. Evaluate Pinecone, Weaviate, Qdrant, and Chroma on performance, scalability, filtering, pricing, and self-hosting for production AI applications.

Mar 27, 2026 · 14 min read

Vector Databases Compared: Pinecone vs Weaviate vs Qdrant vs Chroma vs pgvector 2025

A comprehensive comparison of the top vector databases in 2025. Learn how Pinecone, Weaviate, Qdrant, Chroma, and pgvector differ in performance, pricing, and use cases for RAG and semantic search.

Apr 1, 2026 · 13 min read

Vector Databases Explained: Pinecone vs Weaviate vs Qdrant vs Chroma (2026 Guide)

A complete comparison of the best vector databases in 2026: Pinecone, Weaviate, Qdrant, Chroma, and pgvector. Pricing, code examples, performance benchmarks, and a clear decision framework for AI and LLM applications.

Mar 28, 2026 · 12 min read

Building a RAG Pipeline from Scratch: Embeddings, Vector Databases, and Retrieval

Step-by-step guide to building a production-ready RAG pipeline in Python. Covers embeddings, chunking strategies, Chroma and Pinecone setup, hybrid search, reranking, and evaluation with RAGAS.

Mar 28, 2026 · 14 min read

Building Production RAG Systems with LlamaIndex and Vector Databases 2026

Complete guide to building production-ready RAG systems with LlamaIndex v0.10+. Covers chunking strategies, embedding models, Chroma, Pinecone, Weaviate integration, and advanced retrieval patterns.

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →