Find answers from the community

Updated 8 months ago

StorageContexy

At a glance
Hello, I have some questions about StorageContext and using 3rd party vector stores (say Weaviate/Redis).

  1. Can StorageContext only keep track of 1 vector store? What if I have more than 1? (just asking to understand this better)
  2. Why might I still want to use StorageContext if I am using a 3rd party vector store?
W
L
2 comments
  1. Yes one instance of storageContext keeps one instance of vector store.
  1. You don't have to explicitly define the storageContext. You can load the index with
imdex=VectorStoreIndex.from_vector_store(vector_store=vector_store)

But if you have some use for docstore then storageContext makes it easy to wrap everything under a single hood.
Got it. This is what I understood as well.

Thanks a lot for confirming!
Add a reply
Sign up and join the conversation on Discord