How to Set Up Qdrant for RAG with Metadata Filters

November 6, 2026

Qdrant is an open-source vector database written in Rust that stores embeddings alongside JSON payloads and applies filters during the search rather than after it. That design is why it is the common choice once a RAG prototype has to scale past one tenant.

Why does filtering location matter so much?

Because post-filtering loses recall. If you fetch the top 100 nearest vectors and then discard the ones belonging to another tenant, you might be left with three results — or none. The nearest neighbours were never the right ones for that tenant.

Qdrant runs the filter inside the HNSW traversal, so the search only ever considers candidates that match. Multi-tenant retrieval stops being a correctness bug and becomes a filter.

How do you set up a collection?

Use the Python client, or the REST API on port 6333.

CODE: from qdrant_client import QdrantClient, models client = QdrantClient(url=localhost port 6333) client.create_collection( collection_name set to docs, vectors_config set to VectorParams with size 1536 and Cosine distance )

The vector size must match your embedding model exactly — 1536 for the small OpenAI embedding models, 1024 for several open ones. A mismatch fails at insert time, not at creation, which wastes a batch run.

The documented multi-tenant pattern is one collection with a payload index on tenant id, not one collection per customer.

How do you ingest and filter?

Each point needs a vector and a payload. Filter on payload fields.

CODE: call client.upsert on the docs collection with a PointStruct carrying id, vector emb, and a payload of tenant_id, source and year

Then query with a filter:

CODE: call client.search on docs with query_vector q, limit 5, query_filter set to models.Filter with must containing a FieldCondition on tenant_id matching value 42

Without a payload index on tenant_id, every filtered query scans. Create it: create_payload_index on the docs collection, on tenant_id, with type integer. That one line is the difference between 20ms and 2s on a million points.

How much memory will it need?

Plan on 4 bytes per dimension per vector before indexing overhead. A million 1536-dimension vectors is about 6 GB of raw float32 data, plus the HNSW graph.

Scalar quantisation to int8 cuts that roughly four times with a rescoring pass, and binary quantisation claims up to 32x. Enable quantisation before you buy a bigger server.

Qdrant Cloud’s free tier is a 1 GB cluster with no time limit; paid clusters start around $25/month. Self-hosting has no vector cap and no bill, but you own backups and monitoring.

What are the operational traps?

Backups are yours. Snapshots exist and can be restored into a new cluster, but nothing schedules them for you on a self-hosted instance. Set a cron.

Version upgrades occasionally change the collection format; read the release notes before bumping a production node. And ef_construct / m tuning is worth leaving at defaults under roughly 10 million vectors — early tuning usually makes things worse before it makes them better.

If you need hybrid retrieval, Qdrant supports dense plus sparse BM25-style vectors in one query. That is often a bigger retrieval win than any tuning.

Who should use Qdrant?

Teams building RAG where tenant isolation or metadata filtering is non-negotiable. Product search that needs vector similarity plus price and stock filters. Anyone who wants to self-host and keep embeddings on their own infrastructure.

Skip it if you have under 50,000 vectors and just need a semantic search box — a managed vector feature inside your existing database, or a lighter store, is less to operate. And skip it if nobody on the team wants to own a database; in that case use Qdrant Cloud and budget for it.

Quick Summary

  • Qdrant is an open-source vector database (Apache 2.0) that filters payloads inside HNSW traversal.
  • One collection plus a tenant_id payload index is the documented multi-tenant pattern.
  • Create the payload index or filtered queries degrade to full scans.
  • Roughly 6 GB of RAM per million 1536-dimension vectors; quantisation cuts that 4x or more.
  • Free cloud tier is 1 GB; paid clusters start near $25/month; self-hosting means you own backups.

Distances, quantisation modes, and cloud pricing tiers are listed on the Qdrant tool page.

Tags: