-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Description
Question Validation
- I have searched both the documentation and discord for an answer.
Question
nodes = meta_data2_nodes(documents)
storage_context = StorageContext.from_defaults()
storage_context.docstore.add_documents(nodes)
vector_index = VectorStoreIndex(nodes, storage_context=storage_context)
keyword_index = SimpleKeywordTableIndex(nodes, storage_context=storage_context)
meta_data2_nodes is my custom metadata extractor function. now as my data amount is quite large, i want use milvus as my vector store backend, and here is my code
documents = SimpleDirectoryReader("./data/TEST_V1/Antibody").load_data()
nodes = meta_data2_nodes(documents)
# initialize storage context (by default it's in-memory)
storage_context = StorageContext.from_defaults()
storage_context.docstore.add_documents(nodes)
# 创建向量索引(使用 Milvus)
vector_index = VectorStoreIndex.from_vector_store(vector_store=milvus_store,
storage_context=storage_context)
# 创建关键词索引(使用默认存储)
keyword_index = SimpleKeywordTableIndex(nodes, storage_context=storage_context)
my question is without passing nodes to vector_index = VectorStoreIndex.from_vector_store(vector_store=milvus_store, storage_context=storage_context) , can i still get the correct vector index in milvus (nodes info, embedding info)