mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
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>