Database / Qdrant Vector DB Interview questions
What is payload filtering in Qdrant?
Payload filtering lets a query narrow results to points whose payload matches specified conditions, combined directly with vector similarity search rather than as a separate post-processing step, so a query can express something like "find similar vectors, but only where category equals 'news' and price is under $50."
from qdrant_client import models results = client.query_points( collection_name="documents", query=query_vector, query_filter=models.Filter( must=[ models.FieldCondition(key="category", match=models.MatchValue(value="news")), models.FieldCondition(key="price", range=models.Range(lt=50)), ] ), limit=10, )
Filters are built from conditions combined with boolean clauses — must (AND), should (OR), and must_not (NOT) — and individual conditions support exact value matching, numeric or date ranges, full-text matching, geographic radius, and checks against array membership, covering most common filtering needs without needing to drop down into a separate query language.
Filtering can run without any dedicated payload index by scanning payloads directly, but for frequently filtered fields, creating a payload index (covered separately) makes filtered search dramatically faster, especially as a collection grows into millions of points.
More Related questions...