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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Formatter & Validator
Format, beautify, and validate JSON online. Paste your JSON to instantly pretty-print it with 2-space, 4-space, or tab indentation. Minify JSON too. Free, runs in your browser.
Open free tool →
Regex Tester
Free regex tester. Test regular expressions against multiple strings with expected match/no-match assertions — see instant pass/fail results. Built-in presets for email, URL, IPv4, and phone. Pro: unl
Open free tool →
Base64 Encoder & Decoder
Free Base64 Encoder & Decoder. Convert text, images, and any file to Base64 and back. Supports URL-safe Base64, image data URIs, and file download from Base64. Runs 100% in your browser — no data sent
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
Best AI Code Review Tools 2026: CodeRabbit, Sourcery, DeepCode & Bito Compared
Compare top AI code review tools for 2026: CodeRabbit, Sourcery, DeepCode, and Bito. Features, pricing, GitHub/GitLab integration, and choosing the right tool for your team.
AI Code Review Tools 2026: GitHub Copilot, CodeRabbit, Qodo Merge Ranked
Compare AI code review tools for 2026: GitHub Copilot code review, CodeRabbit, Qodo Merge, Sourcery, and PR-Agent. Pricing, accuracy, and GitHub integration.
AI Coding Tools Comparison 2026: GitHub Copilot vs Cursor vs Windsurf vs Cline
Comprehensive comparison of the best AI coding tools in 2026: GitHub Copilot, Cursor, Windsurf, and Cline. Pricing, features, model support, and real-world benchmarks.
AI Pair Programming in 2026: GitHub Copilot vs Cursor vs Claude Code
Master AI pair programming in 2026. Compare GitHub Copilot, Cursor, and Claude Code for autocomplete, chat, and agentic workflows. Includes setup guides and productivity tips.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
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 |
|---|---|---|---|---|
| Language | Rust | Proprietary | Go | Go + C++ |
| Quantization | Scalar/Product/Binary | No | No | Yes (IVF) |
| Hybrid search | Sparse + dense (RRF) | Limited | BM25 + vector | Yes |
| Payload filtering | In-graph (fast) | Yes | Yes | Yes |
| Open source | Yes (Apache 2.0) | No | Yes | Yes |
| Distributed | Yes (cluster mode) | Yes (managed) | Yes | Yes (native) |
| Best for | Perf + flexibility | Managed simplicity | Hybrid RAG | Billion-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.
Related Products
on GumroadAI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →AI Developer Prompts Pack
55 battle-tested prompt templates for the workflows developers actually use: code review, debugging, architecture, documentation, and testing. Stop writing prompts from scratch.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
CrewAI Agent Config Generator
Build CrewAI agent configurations visually. Define roles, goals, backstories, and tools. Generate YAML or Python code for multi-agent crews.
Open free tool →
Embedding Storage Calculator
Calculate storage requirements for vector embeddings at scale. Choose model, precision, and vector count to get RAM, disk, and Pinecone cost estimates.
Open free tool →
Test Coverage Calculator
Calculate line, branch, function, and statement code coverage percentages. Set thresholds, check pass/fail status, and generate Jest/Vitest coverage config snippets.
Open free tool →
More Free Tools
Related Articles
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.
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.
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.
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.
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.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →