----------------------
Based on the information provided in the knowledge sources, it is not explicitly stated that you can combine multiple indexes into one vector index. However, it is mentioned that each index uses the same underlying Node and that you can build a separate vector index per city or choose to define a single vector index across all documents, annotating each chunk by metadata.
Here is an example of how to create multiple indexes:
summary_index = SummaryIndex(nodes, storage_context=storage_context)
vector_index = VectorStoreIndex(nodes, storage_context=storage_context)
keyword_table_index = SimpleKeywordTableIndex(nodes, storage_context=storage_context)
And here is an example of how to build a separate vector index per document (city in this case):
vector_indices = []
for wiki_doc in wiki_docs:
vector_index = VectorStoreIndex.from_documents([wiki_doc])
vector_indices.append(vector_index)
These examples suggest that while you can create multiple indexes and build separate vector indexes for different sets of documents, there is no direct mention of combining multiple indexes into one vector index.
For more detailed information, you may want to refer to the official documentation or source code of LlamaIndex.
Sources:
- LlamaIndex > En > Latest > Examples > Docstore > Docstore Demo¶ > Define Multiple Indexes¶ ()
- Jerryjliu > Llama_index > Blob > Main > Docs > Docs > Examples > Query_engine > SQL Router Query Engine > Build Vector Index ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------