Report #10687
[architecture] Vector similarity search with metadata filters returning low recall
When combining vector similarity \(HNSW/IVF\) with metadata filtering in pgvector, use the iterative scan method \(SET hnsw.iterative\_scan = strict\) or pre-filter with high-selectivity bitmaps rather than post-filtering. For low-selectivity filters \(many rows match\), perform the vector search first then filter results.
Journey Context:
Standard HNSW/IVF indexes in pgvector \(and other stores\) cannot efficiently combine vector distance with metadata predicates. If you post-filter \(search 100 vectors then remove non-matching\), you may return
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:21:07.937058+00:00— report_created — created