Qdrant (vector store)¶
Qdrant holds the content embeddings and tag payloads. Both the Content Engine (writer) and the AI Engine API (reader) talk to it. Deploy it once; everything else points at it.
Run locally (Docker)¶
docker run -d --name qdrant \
-p 6333:6333 -p 6334:6334 \
-v qdrant_storage:/qdrant/storage \
qdrant/qdrant:latest
6333HTTP/REST,6334gRPC.- The named volume
qdrant_storagepersists data across restarts. - Web dashboard: open
http://localhost:6333/dashboard.
Configure clients¶
Point both services at it (see Configuration):
QDRANT_API_URL=http://localhost:6333
QDRANT_API_KEY= # empty for local; set for Qdrant Cloud
COLLECTION_NAME=omeka-items
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
COLLECTION_NAME and EMBEDDING_MODEL must match across the Content Engine and the API.
Create the collection¶
You do not create it by hand. The first run of the Content Engine creates the collection and its payload indexes (tags, locations, datetime) when it ingests. Just bring Qdrant up first, then ingest.
Verify¶
curl http://localhost:6333/collections # lists collections
curl http://localhost:6333/collections/omeka-items # after first ingest
Production¶
- Use Qdrant Cloud or a managed cluster: set
QDRANT_API_URLto the cluster URL andQDRANT_API_KEYto the key. - Take periodic snapshots for backup (
POST /collections/{name}/snapshots). - Keep Qdrant in the same region as the API and Redis for low latency.
- Do not expose Qdrant publicly without an API key and TLS.
Kubernetes¶
Qdrant is stateful, so back it with a PersistentVolumeClaim.
apiVersion: apps/v1
kind: Deployment
metadata: { name: qdrant }
spec:
replicas: 1
selector: { matchLabels: { app: qdrant } }
template:
metadata: { labels: { app: qdrant } }
spec:
containers:
- name: qdrant
image: qdrant/qdrant:latest
ports: [{ containerPort: 6333 }, { containerPort: 6334 }]
volumeMounts: [{ name: storage, mountPath: /qdrant/storage }]
volumes:
- name: storage
persistentVolumeClaim: { claimName: qdrant-pvc }
---
apiVersion: v1
kind: Service
metadata: { name: qdrant }
spec:
selector: { app: qdrant }
ports: [{ name: http, port: 6333 }, { name: grpc, port: 6334 }]
Or the official Helm chart:
In-cluster, clients use QDRANT_API_URL=http://qdrant:6333.