-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
FEAT: support milvus to full text search #11430
FEAT: support milvus to full text search #11430
Conversation
May i Know will this affect the old data? @kgpp34 |
I fix my code and it will guarantee the change will not influence the CRUD on the old data |
Please fix the lint errors |
i have fixed the poetry lock link error |
pls resolve conflicts thanks @kgpp34 |
I have resolved these conflicts, thanks |
@kgpp34 Hello, there are some conflicts when rebasing the main branch, please resolve it again. :) The rest LGTM. |
7e3a615
to
629ef76
Compare
- Modified to support new sparse_vector field types and configurations required for full-text search. - Implemented full-text search capabilities in . - Updated to include new dependencies(pymilvus==2.5.0 ]python-dotenv=1.0.1) - Enhanced integration tests in to cover the new full-text search functionality. This commit improves the search functionality within the Milvus data source, ensuring efficient and accurate retrieval of relevant data. Signed-off-by: YoungLH <974840768@qq.com>
…lt docker-compose.yaml Signed-off-by: YoungLH <974840768@qq.com>
Signed-off-by: YoungLH <974840768@qq.com>
…of existing data Signed-off-by: YoungLH <974840768@qq.com>
Signed-off-by: YoungLH <974840768@qq.com>
Signed-off-by: YoungLH <974840768@qq.com>
629ef76
to
01cfbec
Compare
Signed-off-by: YoungLH <974840768@qq.com>
@crazywoola I have resolved the conflicts in |
this function has a breaking change: if user's milvus version is below 2.5, it may cause error. so, I suggest that you can add a env variable to check user's version @kgpp34 |
- Added an environment variable to allow users to explicitly enable or disable hybrid search. - Updated the function to respect the environment variable and check the Milvus server version. - If the Milvus version is below 2.5.0 or hybrid search is disabled via the environment variable, hybrid search functionality will be disabled to prevent errors. - Improved error handling and logging for version checks to ensure graceful fallback when hybrid search is not supported. This change ensures that users with Milvus versions below 2.5.0 do not encounter breaking changes and can continue using the system without hybrid search functionality. Signed-off-by: YoungLH <974840768@qq.com>
Hi @JohnJyong , Thank you for your valuable feedback! I’ve addressed the issue by adding an environment variable MILVUS_ENABLE_HYBRID_SEARCH to allow users to explicitly enable or disable hybrid search. Additionally, I’ve updated the _check_hybrid_search_support function to check the Milvus server version and ensure backward compatibility for users with versions below 2.5.0. If the Milvus version is below 2.5.0 or hybrid search is disabled via the environment variable, the system will gracefully disable hybrid search functionality to prevent errors. This ensures that users with older Milvus versions can continue using the system without issues. Please let me know if there’s anything else that needs to be addressed! |
LGTM |
If the VDB type is Milvus, v0.15.0 the Retrieval method only show semantic search. api/controllers/console/datasets/datasets.py |
Summary
This pull request focuses on enabling full-text search capabilities within the Milvus data source, improving the overall search functionality and ensuring that the integration is robust and reliable.
Resolves #11370
Motivation and Context
The motivation behind this change is to improve the search capabilities of the Dify project by integrating full-text search support in the Milvus data source. This enhancement allows for more efficient and accurate retrieval of relevant data, which is crucial for improving the overall user experience.
Dependencies
pymilvus
(version update to 2.5.0)python-dotenv
(version update to 1.0.1)milvus
(version 2.5.0-beta)Detailed Changes
Modified:
core/rag/datasource/vdb/field.py
Modified:
core/rag/datasource/vdb/milvus/milvus_vector.py
Modified:
pyproject.toml
Modified:
tests/integration_tests/vdb/milvus/test_milvus.py
Modified:
docker/docker-compose.yaml
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods