# Qdrant — Vector Search Engine for AI Applications > High-performance open-source vector database for AI search and RAG. Qdrant offers advanced filtering, quantization, distributed deployment, and a rich Python/JS SDK. ## Install Copy the content below into your project: ## Quick Use ```bash # Docker (recommended) docker run -p 6333:6333 qdrant/qdrant # Or pip for embedded mode pip install qdrant-client ``` ```python from qdrant_client import QdrantClient from qdrant_client.models import Distance, VectorParams, PointStruct client = QdrantClient("localhost", port=6333) # Create collection client.create_collection( collection_name="docs", vectors_config=VectorParams(size=1536, distance=Distance.COSINE), ) # Insert vectors client.upsert( collection_name="docs", points=[ PointStruct(id=1, vector=[0.1, 0.2, ...], payload={"title": "Doc A"}), PointStruct(id=2, vector=[0.3, 0.4, ...], payload={"title": "Doc B"}), ], ) # Search results = client.query_points( collection_name="docs", query=[0.15, 0.25, ...], limit=5, ) ``` ## What is Qdrant? Qdrant (read: "quadrant") is a high-performance open-source vector database written in Rust. It is purpose-built for AI applications — semantic search, RAG pipelines, recommendation systems, and anomaly detection. Qdrant stands out with its advanced payload filtering, multiple quantization options, and production-ready distributed mode. **Answer-Ready**: Qdrant is a Rust-based open-source vector database for AI search. Advanced payload filtering, scalar/binary/product quantization, distributed deployment, and rich SDKs. Used by major AI companies for production RAG. Qdrant Cloud for managed hosting. 22k+ GitHub stars. **Best for**: AI teams building production search and RAG systems. **Works with**: OpenAI, Cohere, HuggingFace embeddings, LangChain, LlamaIndex. **Setup time**: Under 2 minutes. ## Core Features ### 1. Advanced Filtering ```python from qdrant_client.models import Filter, FieldCondition, MatchValue results = client.query_points( collection_name="docs", query=[0.15, 0.25, ...], query_filter=Filter( must=[ FieldCondition(key="category", match=MatchValue(value="ai")), FieldCondition(key="year", range={"gte": 2024}), ] ), limit=10, ) ``` ### 2. Quantization (Memory Savings) | Method | Memory | Accuracy | Speed | |--------|--------|----------|-------| | None (float32) | 100% | 100% | Baseline | | Scalar (int8) | 25% | 99%+ | Faster | | Binary | 3% | 95%+ | Fastest | | Product | 5-10% | 97%+ | Fast | ### 3. Sparse Vectors (Hybrid Search) ```python from qdrant_client.models import SparseVector # Combine dense + sparse for hybrid search client.upsert( collection_name="docs", points=[PointStruct( id=1, vector={"dense": [0.1, 0.2, ...], "sparse": SparseVector(indices=[1, 5, 100], values=[0.5, 0.3, 0.8])}, payload={"title": "Doc A"}, )], ) ``` ### 4. Distributed Mode ```yaml # Multi-node cluster storage: shard_number: 6 replication_factor: 2 ``` ### 5. Multiple SDKs | Language | Package | |----------|---------| | Python | `qdrant-client` | | JavaScript | `@qdrant/js-client-rest` | | Rust | `qdrant-client` | | Go | `go.qdrant.io/client` | | Java | `io.qdrant:client` | ## Qdrant vs Alternatives | Feature | Qdrant | Pinecone | Weaviate | Milvus | |---------|--------|----------|----------|--------| | Open source | Yes | No | Yes | Yes | | Language | Rust | - | Go | Go/C++ | | Filtering | Advanced | Basic | GraphQL | Basic | | Quantization | 3 methods | Limited | Limited | Yes | | Managed cloud | Yes | Yes | Yes | Yes | ## FAQ **Q: How does it scale?** A: Distributed mode with sharding and replication. Handles billions of vectors across multiple nodes. **Q: Is there a managed version?** A: Yes, Qdrant Cloud offers managed hosting with a free tier (1GB). **Q: Can I run it embedded (no server)?** A: Yes, `QdrantClient(":memory:")` or `QdrantClient(path="./db")` for local file storage. ## Source & Thanks > Created by [Qdrant](https://github.com/qdrant). Licensed under Apache 2.0. > > [qdrant/qdrant](https://github.com/qdrant/qdrant) — 22k+ stars ## 快速使用 ```bash docker run -p 6333:6333 qdrant/qdrant ``` 一行启动高性能向量数据库。 ## 什么是 Qdrant? Qdrant 是 Rust 编写的开源高性能向量数据库,专为 AI 应用设计。高级过滤、多种量化、分布式部署。 **一句话总结**:Rust 开源向量数据库,高级负载过滤 + 三种量化 + 分布式 + 5 种语言 SDK,AI 搜索和 RAG 首选,22k+ stars。 **适合人群**:构建生产级搜索和 RAG 的 AI 团队。 ## 核心功能 ### 1. 高级过滤 支持嵌套条件、范围、匹配等复杂过滤。 ### 2. 量化 Scalar/Binary/Product 三种方式,最高省 97% 内存。 ### 3. 混合搜索 Dense + Sparse 向量组合。 ## 常见问题 **Q: 有托管版?** A: Qdrant Cloud,免费层 1GB。 **Q: 能嵌入式运行?** A: 可以,内存模式或本地文件。 ## 来源与致谢 > [qdrant/qdrant](https://github.com/qdrant/qdrant) — 22k+ stars, Apache 2.0 --- Source: https://tokrepo.com/en/workflows/c94ec45f-6f0e-42b9-8d75-c2dd7b5840b9 Author: AI Open Source