From: knizhnik (@knizhnik) <noreply+knizhnik@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #259: Understanding HNSW + filtering
Date: Thu, 26 Oct 2023 08:48:07 +0000
Message-ID: <gh-pgvector-pgvector-259-c1780681395@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>
Certainly you can automate creation of indexes.
But what if new category is added? Once again - you can create trigger which creates index but ...
If there are ~100 categories, then it can be acceptable. But for larger number of categories - I expect that overhead (including planning time) will be quite large. Also if you create partial index for each category value, then you will note able to rung queries `where category > 100` or `where category in (1,2,3)`