From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #740: HNSW index returns different values when adding a where condition
Date: Sun, 29 Dec 2024 15:37:58 +0000
Message-ID: <gh-pgvector-pgvector-740-c2564761585@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-740@github.com>
References: <gh-pgvector-pgvector-740@github.com>
Hi @sieudx, it sounds like the second query isn't using an approximate index (you can use `EXPLAIN ANALYZE` to confirm). Removing the approximate index will give exact results for the first query. Also, check out the [troubleshooting docs](https://github.com/pgvector/pgvector?tab=readme-ov-file#why-are-there-less-results-for-a-query-after...) for more info.