From: williamhakim10 (@williamhakim10) <noreply+williamhakim10@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #259: Understanding HNSW + filtering
Date: Wed, 08 May 2024 15:23:03 +0000
Message-ID: <gh-pgvector-pgvector-259-c2100835102@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>
I'm not enough of a postgres expert to know for sure, but in my practical experience it's a bit tricky to reason about when the planner will choose to use a pgvector index, and when it won't. I wouldn't bank on the pg16 query plan remaining constant as your data changes. If you *always* want brute-force on filtered searches, I'd recommend using a descending-order sort which will skip the index (see my reply earlier: https://github.com/pgvector/pgvector/issues/259#issuecomment-1979171781)