Why filters should be planned in advance
In enterprise search, text similarity is not the only condition. An employee may only see documents for their branch, current instructions, a specific product, or a department. These restrictions usually live in document metadata: tenant, branch, type, status, effective date, and owner.
In Qdrant, filters operate on payload, structured fields stored alongside a vector. A payload index can be created for fields used frequently in filtering. Qdrant's documentation recommends creating these indexes before data is uploaded: then HNSW can be built with additional edges that help filtered search. If the index is added after upload, the filter still works, but taking advantage of filter-aware HNSW edges requires rebuilding the graph.
Questions first, index schema second
There is no need to index every field “just in case.” Each additional index uses compute and memory. Choose fields based on real user queries and access logic.
A small team can follow a short inventory process:
- collect 10–20 questions employees actually ask the knowledge base;
- list the fields that narrow search: branch, document type, status, or date range;
- identify who maintains each value and in which source system;
- check that values are normalized rather than duplicated with different spellings;
- create indexes only for fields needed by filters or access policies.
If documents for different organizations or departments share a collection, tenant or branch is not merely a search convenience. It is part of the access boundary. Do not rely on the model prompt alone: apply filtering in retrieval, and have the service that builds the vector-store query verify the user's rights.
What to test in a prototype
Create a small test collection and compare queries with and without filters. Measure not only average latency but p95 for typical and highly selective filters. Verify that search does not return another branch's documents, archived instructions, or material with the wrong status. Then estimate payload-index size and update load.
Qdrant notes that for filtered search, additional HNSW edges are added for each indexed field separately, not for every possible combination of fields. A combination of several strict filters may therefore still require a separate relevance and latency check. Combinations can behave differently from each filter on its own.
If the collection is already populated
Adding a payload index later does not require uploading the documents again, but filter-aware HNSW requires rebuilding the graph. This operation is resource-intensive and may take time on a large collection. Before rebuilding, check the data volume, maintenance plan, disk space, and how to move the workload safely. It is a simple experiment on a small prototype; on a production database it should be planned.
Economics and limits
Too many indexes increase memory use and maintenance cost; too few may degrade search latency or prevent efficient filtering. There is no universal list of fields for every knowledge base. Finance, support, and sales questions differ, as do access requirements.
Start with ten real questions and a table of “field — why it is filtered — who populates it — who may see it.” Then create a collection with the minimum index set, test quality and p95, and only then move the full volume. This is cheaper than rebuilding a large graph after discovering that an important field was overlooked.
