pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: vinodhbalasubramanian (@vinodhbalasubramanian) <noreply+vinodhbalasubramanian@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #671: HNSW + Filter inconsistent result issue (based on HNSW index used vs unused)
Date: Wed, 18 Sep 2024 07:23:21 +0000
Message-ID: <gh-pgvector-pgvector-671-c2357700449@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-671@github.com>
References: <gh-pgvector-pgvector-671@github.com>

@jkatz  Could you please explain why this is not considered as a bug? I run my query with one filter, it gives me less records & when I add another filter, it gives me more records, as a developer it is not a code logic bug, this discrepancy occurs based on Postgres query plan usage (HNSW index vs filter index), we could not control Postgres query plan.
Also your suggestion to use B-tree index & avoid HNSW index, it is not possible because:
1. Whenever we don't apply the filter conditions then we need to use HNSW index for faster retrieval
2. In some conditions Postgres doesn't use the B-tree index Ex: if the filter parameter has a condition that pulls heavy data (Ex: amount>1 and amount <100000), in this case Postgres doesn't use any of the B-tree indexes even though amount parameter is B-Tree index.

view thread (13+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-671-c2357700449@github.com>
Permalink:  ../gh-pgvector-pgvector-671-c2357700449@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox