-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community[patch]: Add namespace to allow indexing multiple tables within the same schema #6341
community[patch]: Add namespace to allow indexing multiple tables within the same schema #6341
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for pushing this update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format CI action is failing, could you run yarn format
from inside libs/langchain-community
and push up the changes? Thanks
Issue:
We're working on a tenant based SaaS platform where we use separate tables for each tenant (to avoid infinitely growing tables).
The
createHnswIndex
function translates into a query likewhere the index name is always
vector_embedding_hnsw_idx
.Within the same schema in PostgreSQL, the index name must be unique across all tables.
This means it’s created for the first tenant, but not for anyone else since then the index with that static name already exists.
This PR allows to pass an optional
namespace
string tocreateHnswIndex
which is used a prefixing the index name.@PetersClemens