Qdrant Vector Database
Set up Qdrant for semantic search.
Qdrant is a high-performance vector database used by Cortex for semantic search.
Docker Setup
Quick Start
docker run -p 6333:6333 qdrant/qdrant
With Persistent Storage
docker run -p 6333:6333 \
-v qdrant_data:/qdrant/storage \
qdrant/qdrant
Docker Compose
version: '3.8'
services:
qdrant:
image: qdrant/qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
volumes:
qdrant_data:
Cloud Options
| Provider | Link |
|---|---|
| Qdrant Cloud | cloud.qdrant.io |
| AWS | Available in AWS Marketplace |
| GCP | Available in GCP Marketplace |
Configuration
Add to your .env:
# Local Docker
QDRANT_URL=http://localhost:6333
# Qdrant Cloud
QDRANT_URL=https://your-cluster.qdrant.io:6333
QDRANT_API_KEY=your-api-key
Collection Setup
Cortex automatically creates the required collection on first run. Manual setup:
curl -X PUT http://localhost:6333/collections/cortex_memories \
-H "Content-Type: application/json" \
-d '{
"vectors": {
"size": 1536,
"distance": "Cosine"
}
}'
Production Considerations
| Consideration | Recommendation |
|---|---|
| Storage | Use persistent volumes |
| Replication | Enable for high availability |
| Indexing | Use HNSW for best performance |
| Memory | Allocate enough RAM for your dataset |
Verifying Setup
curl http://localhost:6333/collections/cortex_memories
Should return collection details with vector configuration.