Milvus check_hybrid_search_support Error
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [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.
code is?
✔️ Expected Behavior
Milvus version: 'release/2.5.2-0.1. support hybrid_search
❌ Actual Behavior
No response
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
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 .
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?
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
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😊