Find answers from the community

Home
Members
HardikCurious
H
HardikCurious
Offline, last seen 6 months ago
Joined September 25, 2024
Hello, I am integrating Milvus Database. with using zillz cloud for storing collections. How can I create index from persisted database. My current approach is

Plain Text
milvus_uri = "Public End Point for Project"
access_token = "Access Token for Database"
vector_store = MilvusVectorStore(uri = milvus_uri, 
                                 token = access_token , 
                                 overwrite=False ,
                                 enable_sparse= True ,
                                 sparse_embedding_function=EmbeddingFunction(),
                                 collection_name = "llama" ,
                                 hybrid_ranker="RRFRanker", 
                                 hybrid_ranker_params={"k": 60} )

storage_context = StorageContext.from_defaults(vector_store=vector_store)


documents = SimpleDirectoryReader("more_data").load_data()

index = VectorStoreIndex.from_documents(
    documents , storage_context=storage_context , embed_model = embed_model
)


As you can see I am reading documents for creating index. which should not be the case If I have data on milvus cloud. index should be built directly from persisted database.

Also How to know which type embeddings are used to query. (Sparse Embeddings OR Dense ) And how can change it? In picture attached you can see the data is been persisted on milvus cloud.
3 comments
Y
H
W