What is QdrantVectorStore?
QdrantVectorStore is LangChain's integration with Qdrant, an open-source vector database written in Rust that runs locally as an in-process store (in-memory or on-disk) or as a standalone server. The langchain-qdrant package exposes the same LangChain vector store interface—add_documents(), similarity_search(), max_marginal_relevance_search()—so you can swap between Qdrant local and Qdrant Cloud without changing retrieval code.
In local mode, Qdrant stores vectors in memory or to a local path. This mode requires no Docker or network setup, making it ideal for development and CI. In production, point QdrantVectorStore at a running Qdrant server (url="http://localhost:6333") or Qdrant Cloud. The collection is created automatically with the correct vector size inferred from the first batch of embeddings.
Qdrant supports rich payload-based filtering via its native filter syntax, accessible through the filter parameter on similarity_search(). Payloads (LangChain metadata) are indexed automatically. For high-cardinality filter fields, enable payload indexing in Qdrant's collection config to avoid full-scan performance degradation.
When to Use
You want self-hosted or local vector search with advanced features. Use Qdrant for flexibility and control.
Use Cases
- • Self-hosted search
- • Fast vector matching
- • Advanced filtering
- • Hybrid search
- • Local development
- • Cost control
Key Features
- ✓ Fast search
- ✓ Payload filtering
- ✓ Local + cloud
- ✓ HNSW indexing
- ✓ Batch operations
- ✓ Advanced filtering
When NOT to Use
For managed SaaS—use Pinecone.
Notes
In-memory mode is ephemeral
QdrantVectorStore with location=":memory:" stores nothing to disk—all vectors are lost when the process exits. Use location="/path/to/dir" for persistence between runs, or point to a running Qdrant server for production.
Collection dimension must match embedding model
If the collection already exists with a different vector size than your current embedding model, Qdrant raises an error at upsert time. Drop and recreate the collection when switching embedding models.
Qdrant filter syntax differs from Pinecone
Pass a qdrant_client.http.models.Filter object—not a plain dict. Import Filter, FieldCondition, MatchValue from qdrant_client.http.models. Metadata fields are stored as payload and are indexed automatically.
Async support via AsyncQdrantVectorStore
For async LangChain pipelines, use AsyncQdrantVectorStore from langchain_qdrant. It exposes the same API surface with await-able methods and avoids blocking the event loop during network calls to a remote Qdrant server.
Import
from langchain_qdrant import QdrantVectorStore
Initialization Parameters
| Parameter | Type | Default | Purpose |
|---|---|---|---|
| url | str | None | Qdrant server URL |
Code Examples
Use Qdrant
from langchain_qdrant import QdrantVectorStore
vector_store = QdrantVectorStore.from_documents(
documents, embeddings, url='http://localhost:6333'
)
Local On-Disk Store
from langchain_qdrant import QdrantVectorStore
# Local on-disk store — no Docker needed
vector_store = QdrantVectorStore.from_documents(
documents, embeddings, location='/tmp/qdrant_store'
)
Filtered Similarity Search
from qdrant_client.http.models import Filter, FieldCondition, MatchValue
results = vector_store.similarity_search(
'How does RAG work?', k=5,
filter=Filter(must=[FieldCondition(key='source', match=MatchValue(value='docs'))])
)
Common Mistakes
❌ Forget to run Qdrant server
✅ docker run -p 6333:6333 qdrant/qdrant
Alternative Vector Stores
| Store | When to Use |
|---|---|
| Chroma | For simplicity without server |
Related LangChain References
Browse the full LangChain API reference index to explore more classes, methods, and decorators, or start with the LangChain introduction tutorial for end-to-end context on building with QdrantVectorStore and the wider framework.
QdrantVectorStore FAQ
What is QdrantVectorStore in LangChain?
Use Qdrant vector database with LangChain. QdrantVectorStore is LangChain's integration with Qdrant, an open-source vector database written in Rust that runs locally as an in-process store (in-memory or on-disk) or as a standalone server. The langchain-qdrant package exposes the same LangChain vector store interface—add_documents(), similarity_search(), max_marginal_relevance_search()—so you can swap between Qdrant local and Qdrant Cloud without changing retrieval code. In local mode, Qdrant stores vectors in memory …
Which package provides QdrantVectorStore?
DevShelfHub documents QdrantVectorStore from the langchain-qdrant package. Pin your installed LangChain version and match imports to the snippet on this page.
When should I use QdrantVectorStore?
You want self-hosted or local vector search with advanced features. Use Qdrant for flexibility and control.
When should I avoid using QdrantVectorStore?
For managed SaaS—use Pinecone.
How do I import QdrantVectorStore in Python?
from langchain_qdrant import QdrantVectorStore
Where can I explore more LangChain API reference pages?
Open the LangChain API reference index on DevShelfHub to browse classes, methods, and decorators, each with runnable examples, parameters, common mistakes, and cross-links.