PostgreSQL – pgvector – Keep the ivfflat index when you give results a weight
In a vector search, you often want some documents to count more than others. An official page should come before an old PDF, an up-to-date page before a stale archive. The easy way seems to be putting that weight straight into the sort. SELECT id, weight * (1 – (embedding <=> :q)) AS score FROM … Read more