Skip to content

feat(rag): Milvus support configure database name#978

Merged
LearningGp merged 4 commits intoagentscope-ai:mainfrom
guanxuc:milvus-support-dbname-975
Mar 26, 2026
Merged

feat(rag): Milvus support configure database name#978
LearningGp merged 4 commits intoagentscope-ai:mainfrom
guanxuc:milvus-support-dbname-975

Conversation

@guanxuc
Copy link
Contributor

@guanxuc guanxuc commented Mar 16, 2026

AgentScope-Java Version

1.0.11

Description

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@guanxuc guanxuc requested a review from a team March 16, 2026 09:29
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...java/io/agentscope/core/rag/store/MilvusStore.java 90.90% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@guanxuc guanxuc force-pushed the milvus-support-dbname-975 branch 2 times, most recently from 7ae8f64 to cf21ef8 Compare March 16, 2026 14:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Milvus database selection support to the RAG “simple” MilvusStore so callers can target a specific Milvus database (and optionally create it) instead of always operating on the default DB.

Changes:

  • Add databaseName (and optional databaseProperties) to MilvusStore builder and propagate it into Milvus SDK requests.
  • Ensure the configured database exists (create if missing) and switch the client to that database during initialization.
  • Extend unit tests to cover builder options and database-related initialization paths via mocks.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
agentscope-extensions/agentscope-extensions-rag-simple/src/main/java/io/agentscope/core/rag/store/MilvusStore.java Adds database name/properties support, database existence checks, and passes databaseName through Milvus requests.
agentscope-extensions/agentscope-extensions-rag-simple/src/test/java/io/agentscope/core/rag/store/MilvusStoreTest.java Adds builder/config tests and mock-based tests for database initialization scenarios.

@guanxuc guanxuc force-pushed the milvus-support-dbname-975 branch from cf21ef8 to 57ebc84 Compare March 24, 2026 10:19
@guanxuc
Copy link
Contributor Author

guanxuc commented Mar 24, 2026

@LearningGp Thanks for your review! I have submitted the new code, primarily with the following changes:

  • Rename database to keep consistent.
  • Add unit tests.
  • Deprecated the MilvusStore#create method in favor of using Builder instead.
  • Set databaseName as default if not defined.

@guanxuc guanxuc requested a review from LearningGp March 24, 2026 10:32
@guanxuc guanxuc force-pushed the milvus-support-dbname-975 branch from 81dd2e7 to e7bf9ab Compare March 25, 2026 09:29
@guanxuc
Copy link
Contributor Author

guanxuc commented Mar 25, 2026

@LearningGp I have updated the java docs, thanks for your review again!

@guanxuc guanxuc requested a review from LearningGp March 25, 2026 09:31
@guanxuc guanxuc force-pushed the milvus-support-dbname-975 branch from e7bf9ab to 13b782c Compare March 25, 2026 09:39
Copy link
Collaborator

@LearningGp LearningGp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LearningGp LearningGp merged commit b97dc11 into agentscope-ai:main Mar 26, 2026
6 checks passed
@guanxuc guanxuc deleted the milvus-support-dbname-975 branch March 26, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: MilvusStore 支持 dbName 参数

3 participants