Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieval Setting: Search method configuration problem #12878

Closed
5 tasks done
Tracked by #12927
yuqichou opened this issue Jan 20, 2025 · 4 comments · Fixed by #12930
Closed
5 tasks done
Tracked by #12927

Retrieval Setting: Search method configuration problem #12878

yuqichou opened this issue Jan 20, 2025 · 4 comments · Fixed by #12930
Assignees
Labels
🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.

Comments

@yuqichou
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In the knowledge setting, the search method is only Vector Search, there is no Full-Text Search and Hybrid Search , VECTOR_STORE uses milvus

Image

✔️ Expected Behavior

there should be two additional configuration options for Full-Text Search and Hybrid Search

❌ Actual Behavior

No response

@dosubot dosubot bot added 🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. labels Jan 20, 2025
Copy link

dosubot bot commented Jan 20, 2025

@yuqichou Hello there! 👋 I'm here to help you with any bugs, questions, or contributions. Let's squash those bugs together!

I found some relevant information regarding the issue you're experiencing with the lack of Full-Text Search and Hybrid Search options when using Milvus as the VECTOR_STORE.

  1. Configuration Limitation: The Dify platform does not provide configuration options for Full-Text Search and Hybrid Search in the knowledge setting when using Milvus because the enable_hybrid_search flag in the MilvusConfig class is set to False by default. Additionally, the _check_hybrid_search_support method checks if the current Milvus version supports hybrid search, which requires the version to be >= 2.5.0. If the enable_hybrid_search flag is not set to True or the Milvus version is below 2.5.0, hybrid search is not enabled, and thus, no configuration options are available for it [1][2].

  2. Enabling Hybrid Search: To enable the enable_hybrid_search flag, you need to set it to True in the MilvusConfig class. This can be done when creating an instance of MilvusConfig by setting enable_hybrid_search=True. Ensure that your Milvus version is 2.5.0 or higher to support this feature [3][1].

  3. Similar Discussions: There are similar discussions on this topic, such as web page lack full text search and hybrid search and Full text search and hybrid search when PGVECTOR is specified in VECTOR_STORE, which might provide additional insights or solutions [4][5].

By addressing these points, you should be able to configure the desired search methods in your Dify setup.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@yuqichou
Copy link
Author

yuqichou commented Jan 20, 2025

have set MILVUS_ENABLE_HYBRID_SEARCH to True, and the milvus server version is 2.5.3, but the problem still exists @dosu

@JulyMood
Copy link

JulyMood commented Jan 23, 2025

Image

Modify the code datasets.py to put Milvus in the retrieval_method below

Copy link

dosubot bot commented Jan 23, 2025

If you've already set MILVUS_ENABLE_HYBRID_SEARCH to True and are using Milvus version 2.5.3, but still don't see the Full-Text Search and Hybrid Search options, there might be other factors at play. Here are a few things to check:

  1. Server Version Check: Ensure that the Milvus server version is correctly recognized by the Dify application. The _check_hybrid_search_support method should confirm that the version is 2.5.0 or higher [1].

  2. Configuration Verification: Double-check that the enable_hybrid_search flag is correctly set in the MilvusConfig class. This setting should be reflected in the configuration used by the Dify application.

  3. Logs and Errors: Check the application logs for any warnings or errors related to the search configuration. This might provide clues if there are issues with the configuration or connectivity to the Milvus server.

  4. Interface Logic: Ensure that the display logic for the search options in the user interface is functioning correctly. The file web/app/components/datasets/common/retrieval-method-config/index.tsx handles the display logic for these options [2].

If these steps don't resolve the issue, there might be a deeper configuration or compatibility problem that requires further investigation.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants