supabase / vecs

Postgres/pgvector Python Client
https://supabase.github.io/vecs/latest
Apache License 2.0
219 stars 33 forks source link

create_index takes forever #94

Open mengxi-ream opened 2 days ago

mengxi-ream commented 2 days ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce I have some embedding to be upsert:

        transcript = vx.get_or_create_collection(name="Transcript", dimension=DIMENSION)
        transcript.upsert(records=embeddings)
        transcript.create_index()

The first time it works, but the second time I run it, it gets stuck there (create_index()) forever.

Expected behavior I'm not sure should I use create_index() every time when I upsert something? If I just need to create_index at the first time, how can I check if I created it or not in program (because the previous scripts will run several every day as a cron job)

Screenshots If applicable, add screenshots to help explain your problem.

Versions:

Additional context Add any other context about the problem here.