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: Mon, 22 Jan 2024 21:33:52 +0000
Message-ID: <gh-pgvector-pgvector-259-c1904858314@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>
@jkatz this is very awesome work. I dumped a portion of our production database and installed the branch locally, and it works like a charm. The query planner uses the index as expected, although sadly it uses a `Filter` rather than an `index_cond` when you chain multiple `=` predicates with `OR`. Presumably this is because the query planner thinks it'll be faster (which it probably is) but doesn't know that this actually gives you different results. (That would truly be a killer feature FWIW, because presumably if you have too many possible predicates to create a partial index on each one, then you may want to query against more than one at the same time.)
I did notice that it only supports integers at present; that worked mostly fine for our use case (and obviously it's unreasonable to expect documentation of unreleased features), but good to know.
Any idea how we can help with this, or do you have any idea when we're likely to see this get merged in?