Files
supabase/apps/docs/content
Katerina SkroumpelouandJeremias Menichelli 81049969d9 docs: document filtering vector search by metadata column (#45310)
Adds a worked example for combining a vector similarity search with a
filter on another column from the JS client, and a short note explaining
how filtering interacts with HNSW indexes (including iterative index
scans introduced in `pgvector` 0.8.0). The new `match_documents` variant
takes a typed filter parameter so the planner can apply the predicate
during the index scan, and a jsonb `@>` variant covers the
metadata-column case. Cross-links between `semantic-search`,
`vector-columns`, and `vector-indexes/hnsw-indexes` so readers land on
the answer regardless of which page they start on.

Closes supabase/supabase-js#896

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added guidance for filtering vector and semantic search results by
metadata, with JS client examples.
* Explained how filters affect vector (HNSW) queries and planner choice
between index and sequential scans.
* Clarified that selective filters can reduce returned matches and
documented pgvector 0.8.0 controls for iterative/index scan behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
2026-04-28 15:59:12 +03:00
..