Find answers from the community

Updated 3 months ago

Index

i am getting list[BaseIndex] i cant make query engin on the loaded index
but i can make query engine on index help please
L
S
9 comments
What is the exact error?
i am creating index using VectorStoreIndex.from_documents() and it returns llama_index.core.indices.vector_store.base.VectorStoreIndex
i can create query engine on it using index.as_query_engine()
but these index are in memoy and i want to store them in drive so i ams storing them as
index.storage_context.persist('./store')
and now i want to reuse these stored index and create query engine
so i load them using
Storage_context = StorageContext.from_defaults(persist_dir='./store/')
load_index = load_indices_from_storage(Storage_context)
but when i load them using this methode i get List[BaseIndex] on which i cant do as_query_engine()
Problem solved i made a typo insted of using load_index_from_storage i was using load_indices_from_storage
Add a reply
Sign up and join the conversation on Discord