Stevenic / vectra

Vectra is a local vector database for Node.js with features similar to pinecone but built using local files.
MIT License
321 stars 29 forks source link

How could I check if an index exist before creating it? #28

Closed tregoning closed 8 months ago

tregoning commented 8 months ago

Thanks for the work on this project, so far is looking great.

I am struggling to figure out how to check if an index exist and how to delete it if it does.

scanning through the code I saw: createIndex that can take a config with deleteIfExists. But I must admit I'm struggling to figure out how to call this, any chance of having some example code or any hints please?

Thanks in advnce

tregoning commented 8 months ago

Also any suggestion how to get the size of the index? (let's say after doing a database setup, making sure things worked)