pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: 29swastik (@29swastik) <noreply+29swastik@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #259: Understanding HNSW + filtering
Date: Mon, 04 Dec 2023 05:50:34 +0000
Message-ID: <gh-pgvector-pgvector-259-c1837886552@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-259@github.com>
References: <gh-pgvector-pgvector-259@github.com>

@jkatz 
We also have similar requirements where we have documents uploaded for different bots and when a query comes from end user SQL would look like below (in our case there will be only `=` not `IN` on **bot_number**)

> SELECT id, text FROM document WHERE bot_number = $1 ORDER BY embedding <-> $2 LIMIT 10;

For now we are solving this by having separate table for each bot

> SELECT id, text FROM document_bot_number ORDER BY embedding <-> $2 LIMIT 10;

But this might not be efficient in long run, so is creating hash partition on **bot_number** a good idea?



view thread (90+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-259-c1837886552@github.com>
Permalink:  ../gh-pgvector-pgvector-259-c1837886552@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