from llama_index import load_index_from_storage storage_context = StorageContext.from_defaults( docstore=MongoDocumentStore.from_uri(uri=mongo_url, db_name=db_name), index_store=MongoIndexStore.from_uri(uri=mongo_url, db_name=db_name), ) index_test = load_index_from_storage(storage_context)