langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.66k stars 7.47k forks source link

the auto-created index on Milvus is not working #2569

Closed bowenliang123 closed 8 months ago

bowenliang123 commented 8 months ago

Self Checks

Dify version

main/0.5.6

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

✔️ Expected Behavior

No response

❌ Actual Behavior

dosubot[bot] commented 8 months ago

🤖

From the error message you provided, it seems like the issue is related to the delete_by_ids method in the milvus_vector.py file. The error message indicates that the Milvus client failed to create an expression plan for the deletion operation. This could be due to a variety of reasons, such as an issue with the IDs you're trying to delete, a problem with the Milvus client, or a bug in the Dify code.

Here are a few steps you can take to troubleshoot this issue:

  1. Check the IDs: Make sure the IDs you're trying to delete actually exist in the Milvus collection. You can do this by querying the collection with the IDs before trying to delete them. If the IDs don't exist, that could be the cause of the error.

  2. Update the Milvus client: There might be a bug in the version of the Milvus client you're using that's causing this issue. Try updating to the latest version of the Milvus client and see if that resolves the issue.

  3. Debug the delete_by_ids method: If the above steps don't resolve the issue, you might need to debug the delete_by_ids method in the milvus_vector.py file. You can do this by adding print statements in the method to print out the values of the variables and the execution flow. This might help you identify where exactly the issue is occurring.

If none of these steps resolve the issue, it would be helpful if you could provide more information about your setup and the steps you're taking that lead to this error. Specifically, it would be helpful to know:

This information will help us better understand the issue and provide a more accurate solution.

For more information about the delete_by_ids method and how it interacts with the Milvus client, you can refer to the Milvus Python SDK documentation.

I hope this helps! Let me know if you have any other questions or if there's anything else I can do to assist you.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
crazywoola commented 8 months ago

Fixed in https://github.com/langgenius/dify/pull/2573