Tech
Filtering and Vector Search in One Query
Add WHERE tenant_id = 42 to a working vector query and one of two things happens: it gets slow, or it returns fewer rows than you asked for. Both are the same underlying fact — an approximate index and a filter cannot be applied at the same time — and the selectivity at which it becomes fatal is calculable in advance.
Why the two do not compose
A B-tree index and a GIN index can be combined: Postgres builds a bitmap from each and ANDs them. An HNSW index cannot participate in t...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to