Skip to content
New issue

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

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

Already on GitHub? # to your account

FEAT: support milvus to full text search #11430

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kgpp34
Copy link

@kgpp34 kgpp34 commented Dec 6, 2024

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

  • This change requires the following 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

    • Updated to support new sparse_vector field types and configurations required for full-text search in Milvus.
  • Modified: core/rag/datasource/vdb/milvus/milvus_vector.py

    • Implemented full-text search capabilities within the Milvus vector data source, ensuring efficient and accurate retrieval of relevant data.
  • Modified: pyproject.toml

    • Updated project configuration to include new dependencies and settings necessary for full-text search support in Milvus.
  • Modified: tests/integration_tests/vdb/milvus/test_milvus.py

    • Enhanced integration tests to cover the new full-text search functionality, ensuring that the Milvus integration behaves as expected under various scenarios.
  • Modified: docker/docker-compose.yaml

    • Update docker-compose configuration to include milvus 2.5.0-beta

Checklist

Important

Please review the checklist below before submitting your pull request.

  • 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

- 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>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. labels Dec 6, 2024
@JohnJyong
Copy link
Contributor

May i Know will this affect the old data? @kgpp34

…of existing data

Signed-off-by: YoungLH <974840768@qq.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 7, 2024
Signed-off-by: YoungLH <974840768@qq.com>
@kgpp34
Copy link
Author

kgpp34 commented Dec 7, 2024

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

@crazywoola
Copy link
Member

Please fix the lint errors

@kgpp34
Copy link
Author

kgpp34 commented Dec 9, 2024

Please fix the lint errors

i have fixed the poetry lock link error

@JohnJyong
Copy link
Contributor

pls resolve conflicts thanks @kgpp34

@JohnJyong JohnJyong self-requested a review December 27, 2024 08:28
…_search

# Conflicts:
#	api/core/rag/datasource/vdb/milvus/milvus_vector.py
#	api/poetry.lock
Signed-off-by: YoungLH <974840768@qq.com>
@kgpp34
Copy link
Author

kgpp34 commented Dec 28, 2024

pls resolve conflicts thanks @kgpp34

I have resolved these conflicts, thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Milvus Full Text Search in Dify
3 participants