Skip to content

Is there a potential issue with the Dify design when using Milvus as a vector database? #39444

Discussion options

You must be logged in to vote

In Dify source code, the MilvusVector is a wrapper of pymilvus(milvus python sdk), MilvusVector is derived from BaseVector class, which implements the methods such as create(), add_texts(), search_by_vector().

The MilvusVector internally creates a milvus collection with a pre-defined schema: https://github.com/langgenius/dify/blob/bc3a570dda37cbb8539d9a5c1494e3a4317fc090/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L257

The schema might contain several fields: "id", "metadata", "vector", "text", "sparse_vector". I didn't see any possibility of customizing this schema. And the MilvusVector.search_by_vector() didn't pass the "**kwargs" to the pymilvus.MilvusClient.search() so that us…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ducanh997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants