From: nickcanz (@nickcanz) <noreply+nickcanz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #259: Understanding HNSW + filtering
Date: Thu, 01 Aug 2024 14:49:33 +0000
Message-ID: <gh-pgvector-pgvector-259-c2263270050@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>
For the use case we're trying to build we don't want to "share" small worlds among different users at all, we're always going to query with a specific user in mind and just want similarity search within the scope of the user's items.
Right now, to avoid both the limit and latency problems you've mentioned we're accomplishing that via partial indexes i.e. `CREATE INDEX ON items USING hnsw (embedding vector_l2_ops) WHERE (category_id = 123);` This is accomplishing the job while we have a small number of users, but as we scale this management overhead isn't ideal and even something like table partitioning has overhead when it's in the thousands.