From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #259: Understanding HNSW + filtering
Date: Tue, 07 Nov 2023 02:06:48 +0000
Message-ID: <gh-pgvector-pgvector-259-c1797163789@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>
Hi @jeff-davis, thanks for the proposal.
I agree with the problem statement and was thinking the same for the attribute order (vector column first), even though it's different from b-tree (where filtering columns come first).
For the approach, I'm hoping we can avoid the complexity of multiple graphs by using HQANN. I've started some prototyping on this and think it can be done with a single change to the on-disk format (reinterpreting `vec` as an `IndexTuple` when `IndexRelationGetNumberOfAttributes(index) > 1`).
I also think it may allow for searching any combination of the attributes (`(V, A1)` and `(V, A2)`), not just the leading ones.
Will spend some more time on it this week to try and have something to share.