----------------------
To load multiple indices as a RecursiveRetriever, you would need to create a dictionary where the keys are the names of your indices and the values are the corresponding index objects. However, the information extracts provided do not contain the specific code for loading multiple indices as a RecursiveRetriever.
Here is an example of how you might load multiple indices, based on the information available:
from llama_index import load_index_from_storage, StorageContext, ServiceContext
index_set = {}
service_context = ServiceContext.from_defaults()
for index_name in indices:
storage_context = StorageContext.from_defaults(persist_dir=f"./storage/{index_name}")
cur_index = load_index_from_storage(storage_context, service_context=service_context)
index_set[index_name] = cur_index
In this example,
indices
is a list of the names of your indices. The code loads each index from storage and adds it to the
index_set
dictionary.
Please refer to the
LlamaIndex documentation () for more details on how to load indices from disk.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------