Skip to content
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

indexes on other tables disappear after i create a new one #90

Closed
legaltextai opened this issue Jul 31, 2024 · 4 comments · Fixed by #91
Closed

indexes on other tables disappear after i create a new one #90

legaltextai opened this issue Jul 31, 2024 · 4 comments · Fixed by #91
Assignees

Comments

@legaltextai
Copy link

I create a new index with docs.create_index() on a new table, and noticed that old indices created similarly on another table disapear. Should I somehow mark all of them as unique? I thought the name of the index gets created with unique name and should not be viewed as duplicate? Thanks!

@olirice
Copy link
Collaborator

olirice commented Jul 31, 2024

could you please provide some sample code I can use as a reproduction case?

@legaltextai
Copy link
Author

legaltextai commented Jul 31, 2024

not sure there is much code to provide, other than the vecs code
but basically , i create a table

import vecs 
DB_CONNECTION = "__"

vx = vecs.create_client(DB_CONNECTION)

docs = vx.get_or_create_collection(name="adlumal/auslaw-embed-v1.0", dimension=384) 

upload a table id/vec/metadata

then run docs.create_index()

after i run docs.create_index() on another existing table, the one from the first one disappear.
my gut feeling is that "is_unique" should be set TRUE by default but I am not 100% certain

i mentioned before that i spent a week recently building an hnsw index after the previous one disappeared somewhere, only now i see what's happening after having played with smaller tables.

to replicate , try to create a couple of tables first and then run create_index over one after another.

if create_index is the same as pgvectors hnsw , cosine , with m=16, and ef_construction = 64, and no more variables, should i run rather pgvector index with these parameters?

@legaltextai
Copy link
Author

legaltextai commented Jul 31, 2024

thanks for addressing this. can i run pip update now ?

@olirice
Copy link
Collaborator

olirice commented Jul 31, 2024

thanks for reporting

yes, I just released it in version 0.4.4

https://pypi.org/project/vecs/0.4.4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants