Skip to content

fix(vector): use semantic version comparison for version check#24409

Merged
crazywoola merged 1 commit intolanggenius:mainfrom
huayaoyue6:main
Aug 24, 2025
Merged

fix(vector): use semantic version comparison for version check#24409
crazywoola merged 1 commit intolanggenius:mainfrom
huayaoyue6:main

Conversation

@huayaoyue6
Copy link
Copy Markdown
Contributor

Summary

Fixes a critical bug in Milvus vector database version comparison that could incorrectly evaluate version requirements for hybrid search functionality.

Problem

The current implementation in MilvusVector._check_hybrid_search_support() and OceanBaseVector._check_hybrid_search_support() uses string comparison of base_version attributes:

String comparison fails for multi-digit version numbers. This could disable hybrid search on newer Milvus versions that actually support it.

Solution

Replace string comparison with proper semantic version comparison using Version objects:

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. labels Aug 24, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 24, 2025
@crazywoola crazywoola merged commit 23dcb2d into langgenius:main Aug 24, 2025
9 checks passed
@lyzno1 lyzno1 mentioned this pull request Aug 25, 2025
HarryReidx pushed a commit to HarryReidx/dify that referenced this pull request Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants