Skip to content

[Question]: how to combine milvus with my custom node ingestion pipeline #16504

@ZJL0111

Description

@ZJL0111

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions