A search can have enough relevant permitted documents and still fail to return them because it did not examine enough of the eligible search space. The important distinction is between how many results the caller asks to receive and how much work the search algorithm performs to find those results. Increasing the former does not necessarily increase the latter in the way the workload needs.

Approximate nearest-neighbor search, or ANN, trades exhaustive distance computation for a faster search that can miss true nearest neighbors. HNSW organizes vectors into a navigable graph. A query follows promising connections and maintains candidate sets instead of comparing against every vector. Its search effort is controlled by engine-specific settings and stopping rules. The requested top-k, here 20 results, is an output target rather than a universal measure of graph exploration.

Filtering adds another decision. An engine may explore a global graph and then discard candidates outside the tenant. It may restrict eligibility during traversal, use a dedicated tenant partition, or combine these approaches. These paths have different performance and recall behavior. First inspect the actual query plan and engine contract. Do not assume all HNSW implementations filter after search or all of them understand the filter during navigation.

For a simple hypothetical post-filtering path, imagine 40 considered candidates, each independently having a one-percent chance of belonging to the tenant. The expected eligible count is 40 × 0.01 = 0.4, and the probability of no eligible candidate is about 0.99^40 = 0.669. These assumptions are deliberately simplified. Real vector neighborhoods are correlated and graph search is not uniform random sampling. The calculation explains why a selective filter can starve a small candidate set, not what this index's measured failure rate must be.

The pgvector documentation provides a concrete post-scan filtering example and describes iterative scans that continue searching within configured bounds. That illustrates why search effort and filtering must be considered together. Raising a result limit may cause more work in a particular plan, but it is not a portable fix. Even a larger search can return fewer eligible rows if it reaches a scan bound before finding them. Inspect considered, rejected and returned counts rather than inferring the execution from the SQL limit.

There are several defensible designs. For a small eligible subset, use a conventional tenant index to locate its rows and compute exact vector distances over them. This removes approximation error within that subset and can avoid a much larger global graph traversal. For large stable tenants, separate partitions or indexes can align the search space with the workload. That improves isolation but adds index builds, routing and operational overhead. A filter-aware or iterative ANN path can serve a middle ground with explicit latency and search-effort limits.

Choose by measuring allowed recall against an exact-search oracle over the same eligible set. An oracle here is a baseline that computes every eligible distance, not a model's judgment about which results look good. Measure p99 latency, update cost, memory and result count across different tenant sizes and query shapes. A design that works for the average tenant can still fail badly for a tiny tenant or a heavily filtered user. Routing between exact and approximate paths may be more effective than one global setting.

Tenant membership is only the first permission boundary. A user may see some documents within the tenant and lose access to others while the index remains unchanged. Current authorization must govern private text before it reaches downstream reranking or generation. Search services may need to inspect stored data internally as part of their authorized role, but the application must not treat a retrieved chunk as permission to disclose it. Recheck at the disclosure boundary under the product's stated revocation policy, and invalidate or filter stale derived results.

Quality and security need separate failure tests. Low permitted recall means the assistant may wrongly claim insufficient evidence. Returning a restricted passage to an unauthorized downstream component is a disclosure failure. Expanding search effort can improve the first while doing nothing for the second. As the restricted top-hit question explores, once results exist, the generator still needs an authorized evidence set. This question concerns the earlier search failure that prevented eligible neighbors from appearing at all.

I would validate the chosen path with skewed tenants, restrictive document permissions, concurrent revocations and update load. Record which path each query used and why it stopped. If a bounded search cannot find enough evidence, return a truthful partial result or use a measured exact fallback. Never fill the quota with restricted or weakly related passages merely to produce 20 rows.