Find answers from the community

Updated 5 months ago

Is there a way to set the name for a

Is there a way to set the name for a VectorStoreIndex at create time to handle multiple index stores?. I can load an index using the index_id parameter like:

automerging_index = load_index_from_storage(
storage_context, index_id="my_id", service_context=auto_merging_context
)

However there does not seem to be a way to pass an index_id at create time:
automerging_index = VectorStoreIndex(
leaf_nodes,
storage_context=storage_context,
service_context=auto_merging_context,
)

The index_id can be retrieved after creation using automerging_index.index_id(). However, explicitly naming indices with human readable strings is a lot nicer.
L
c
2 comments
Sadly its only post-creation

I thnk this is mainly because saving things to disk isn't really that scalable/used for long, so people eventually move to using actual vector indexes like qdrant, etc.
I am using Firestore and Pinecone as backends.
storage_context = StorageContext.from_defaults(
docstore=FirestoreDocumentStore(kvstore),
index_store=FirestoreIndexStore(kvstore),
vector_store=PineconeVectorStore(pinecone_index=pinecone_index),
)
I do see the uuid of the vector index in Firestore. Just that it is not intuitive.
{"index_id": "c328d552-7ca0-46d9-aac9-fd52af01d433", "summary": null, "nodes_dict": {}, "doc_id_dict": {}, "embeddings_dict": {}}

I can create a map in firestore as an alternative for name <-> id mapping.
Add a reply
Sign up and join the conversation on Discord