Find answers from the community

Home
Members
chandra
c
chandra
Offline, last seen 3 months ago
Joined September 25, 2024
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.
2 comments
c
L