Milvus check_hybrid_search_support Error #8191

Closed
opened 2026-02-21 18:24:24 -05:00 by yindo · 4 comments
Owner

Originally created by @ic-xu on GitHub (Feb 12, 2025).

Originally assigned to: @JohnJyong on GitHub.

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.3

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

2025-02-12 16:31:36,945.945 WARNING [process-process-chunk-task_1] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search.
2025-02-12 16:31:36,945.945 WARNING [process-process-chunk-task_2] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search.
2025-02-12 16:31:36,946.946 WARNING [process-process-chunk-task_3] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search.
2025-02-12 16:31:36,947.947 WARNING [process-process-chunk-task_0] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search.
2025-02-12 16:31:36,947.947 WARNING [process-process-chunk-task_4] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search.

Image

code is?

Image

✔️ Expected Behavior

Milvus version: 'release/2.5.2-0.1. support hybrid_search

Actual Behavior

No response

Originally created by @ic-xu on GitHub (Feb 12, 2025). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 2025-02-12 16:31:36,945.945 WARNING [process-process-chunk-task_1] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search. 2025-02-12 16:31:36,945.945 WARNING [process-process-chunk-task_2] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search. 2025-02-12 16:31:36,946.946 WARNING [process-process-chunk-task_3] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search. 2025-02-12 16:31:36,947.947 WARNING [process-process-chunk-task_0] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search. 2025-02-12 16:31:36,947.947 WARNING [process-process-chunk-task_4] [milvus_vector.py:101] - Failed to check Milvus version: Invalid version: 'release/2.5.2-0.1.1'. Disabling hybrid search. <img width="1031" alt="Image" src="https://github.com/user-attachments/assets/dea4fd15-6b3d-4ae5-8a8b-e944d6c54975" /> code is? <img width="1226" alt="Image" src="https://github.com/user-attachments/assets/3518029a-8560-4391-aae8-e614273d61c9" /> ### ✔️ Expected Behavior Milvus version: 'release/2.5.2-0.1. support hybrid_search ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug👻 feat:ragoutdated labels 2026-02-21 18:24:24 -05:00
yindo closed this issue 2026-02-21 18:24:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 12, 2025):

The issue you're encountering is due to the _check_hybrid_search_support method in the MilvusVector class, which fails to validate the Milvus version 'release/2.5.2-0.1.1'. This happens because the method uses version.parse(milvus_version).base_version to compare versions, which only considers the major, minor, and patch components, ignoring additional labels like 'release' or build metadata. As a result, the version string 'release/2.5.2-0.1.1' does not match the expected format for comparison, leading to the failure in validation and the disabling of hybrid search [1].

To resolve this, you could modify the version parsing logic to handle such version strings correctly, possibly by stripping out non-numeric prefixes or using a more flexible version parsing approach that can handle additional labels.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Feb 12, 2025): <!-- Answer --> The issue you're encountering is due to the `_check_hybrid_search_support` method in the `MilvusVector` class, which fails to validate the Milvus version 'release/2.5.2-0.1.1'. This happens because the method uses `version.parse(milvus_version).base_version` to compare versions, which only considers the major, minor, and patch components, ignoring additional labels like 'release' or build metadata. As a result, the version string 'release/2.5.2-0.1.1' does not match the expected format for comparison, leading to the failure in validation and the disabling of hybrid search <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/rag/datasource/vdb/milvus/milvus_vector.py)</sup>. To resolve this, you could modify the version parsing logic to handle such version strings correctly, possibly by stripping out non-numeric prefixes or using a more flexible version parsing approach that can handle additional labels. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=other) | [Bug Report](https://app.dosu.dev/response-feedback/d70f52de-8892-479e-aab3-f982c8046837?feedback_type=bug_report)</sup>
Author
Owner

@huayaoyue6 commented on GitHub (Feb 13, 2025):

version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern.

Also , _fields init with empty list , see this. this will cause got non match fileld when invoke this code . _fields should init with value from field's name in schema from milvus's client use describe_collection method .

@huayaoyue6 commented on GitHub (Feb 13, 2025): version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern. Also , _fields init with empty list , see [this](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L74C14-L74C21). this will cause got non match fileld when invoke this [code ](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L239). _fields should init with value from field's name in schema from milvus's client use describe_collection method .
Author
Owner

@aoyifei commented on GitHub (Mar 10, 2025):

version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern.

Also , _fields init with empty list , see this. this will cause got non match fileld when invoke this code . _fields should init with value from field's name in schema from milvus's client use describe_collection method .

I am using milvus 2.5.4, dify-0.15.3, but still get similar error as below, it said cannot parse the version'pkg/v.2.5.4', is this a bug, or what can i do to overcome this version check?

Image

@aoyifei commented on GitHub (Mar 10, 2025): > version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern. > > Also , _fields init with empty list , see [this](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L74C14-L74C21). this will cause got non match fileld when invoke this [code ](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L239). _fields should init with value from field's name in schema from milvus's client use describe_collection method . I am using milvus 2.5.4, dify-0.15.3, but still get similar error as below, it said cannot parse the version'pkg/v.2.5.4', is this a bug, or what can i do to overcome this version check? ![Image](https://github.com/user-attachments/assets/512d2769-c699-480e-8672-89f264406daf)
Author
Owner

@Sos-Zachary commented on GitHub (Apr 8, 2025):

version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern.版本值可能是字符串,如 "Pkg/2.5.4",而不是其他 SemVer 模式。

Also , _fields init with empty list , see this. this will cause got non match fileld when invoke this code . _fields should init with value from field's name in schema from milvus's client use describe_collection method .此外,_fields 使用空列表初始化,请参见此处。这将在调用此代码时导致获取不匹配的文件字段。_fields 应使用来自 milvus 客户端 schema 中字段名称的值初始化,使用 describe_collection 方法。

@huayaoyue6 hi! Contributor,my version's value is the pattern like 'pkg/v2.5.5',also has this issue

Image

why this try-except block running to the 'except' that it not go to compare the version?

I noticed that you mentioned the related problem of _fields, but I am a novice to use milvus, could you give me a more detailed description? Thank you in advance😊

@Sos-Zachary commented on GitHub (Apr 8, 2025): > version's value maybe string like "Pkg/2.5.4", not like other SemVer pattern.版本值可能是字符串,如 "Pkg/2.5.4",而不是其他 SemVer 模式。 > > Also , _fields init with empty list , see [this](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L74C14-L74C21). this will cause got non match fileld when invoke this [code ](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L239). _fields should init with value from field's name in schema from milvus's client use describe_collection method .此外,_fields 使用空列表初始化,请参见此处。这将在调用此代码时导致获取不匹配的文件字段。_fields 应使用来自 milvus 客户端 schema 中字段名称的值初始化,使用 describe_collection 方法。 @huayaoyue6 hi! Contributor,my version's value is the pattern like 'pkg/v2.5.5',also has this issue ![Image](https://github.com/user-attachments/assets/016ebca6-95e7-40a4-a796-da1fce79dbef) why [this](https://github.com/langgenius/dify/blob/33a565a719036a99c95745944ebdff1432abddc9/api/core/rag/datasource/vdb/milvus/milvus_vector.py#L85-L90) try-except block running to the 'except' that it not go to compare the version? I noticed that you mentioned the related problem of _fields, but I am a novice to use milvus, could you give me a more detailed description? Thank you in advance😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8191