Skip to content

Update milvus rust sdk to milvus2.5#95

Closed
Yinwei-Yu wants to merge 2 commits intomilvus-io:mainfrom
Yinwei-Yu:add_collection_api
Closed

Update milvus rust sdk to milvus2.5#95
Yinwei-Yu wants to merge 2 commits intomilvus-io:mainfrom
Yinwei-Yu:add_collection_api

Conversation

@Yinwei-Yu
Copy link
Contributor

@Yinwei-Yu Yinwei-Yu commented Jun 18, 2025

This pr aims to update the milvus rust sdk to milvus 2.5.

@sre-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Yinwei-Yu
To complete the pull request process, please assign yah01 after the PR has been reviewed.
You can assign the PR to them by writing /assign @yah01 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot requested review from congqixia and yah01 June 18, 2025 08:18
@sre-ci-robot
Copy link
Collaborator

Welcome @Yinwei-Yu! It looks like this is your first PR to milvus-io/milvus-sdk-rust 🎉

@mergify
Copy link

mergify bot commented Jun 18, 2025

@Yinwei-Yu Please associate the related issue to the body of your Pull Request. (eg. “issue: #187”)

Update proto files and add some releated struct fields due to the changes.
Add alter_collection_field()

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

add collection apis:
- alter_collection_properties
- create_schema
- describe_alias
- drop_collection_properties
- list_aliases
- rename_collection

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add apis for query and partition

What's changed:
1. client.rs: Add comment for list_aliases
2. collectoin.rs: Change the return type for describe_collection() from `collection` to `DescribeCollection`,containing more info than before,which now acts like pymilvus.
3. partitions.rs: Add load_partitions and release_partitions,following their options' struct.
4. query.rs: Add get() and it's following functions and struct,like extract_primary_field and pack_pks_expr,like pymilvus.Add options for query() to use and some build functions for QueryOptions.
5. test/: Change some settings and details to adapt to the changes above

Why Change Some Struct:
To catch up with pymivus,we need to approve optional params,so we need to change the option struct

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Update search() and add hybrid_search()

Update search() function following the pymilvus'api.Add hybrid_search() function and it's related structures and help_functions().

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add query_iterator() in iterator and add an example file.

Add the query_iterator() function which return an iterator on QueryResult,public api
includs next().To do this,add two Error type in src/error.rs.To test functions with
data,I modifed the create_test_collection() function in tests/common/mod.rs.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add search_iterator() and example.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add database apis.

Add full database apis including create,alter,drop,etc.
To add using_database(),I need to add a member to client
Struct,db_interceptor.And changed some codes with respect
to it.
Then I add an example file to test the apis,which works
well.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add resource group apis.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add apis in Management.

Move some index apis to src/index/utils,and add
some more apis.Add two Index type.Fix some related
errors due to the change.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add all apis for authentication.

In this commit I've complete all the apis related to
authentication,including users,role,privilege,privilege
groups,etc.

And I've added an example to show how to use these apis
and test the apis to a certain extent.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Delete some unecessary 'use's in some file.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

Add comments doc to query.rs

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>

[bugfix]Change AnnSearchRequest and The params settings for search and hybrid_search.

Changed AnnSearchRequest's params from KeyValuePair to Vec<KeyValuePair> to enable
different search options for different anns_field.
Change the default params setting mothod,following pymilvus.
Add some more graceful error handlers to raw_id.Now if the search result is null,the
code will throw an error and continue to run.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>
@Yinwei-Yu Yinwei-Yu force-pushed the add_collection_api branch from d80b119 to f342185 Compare July 9, 2025 03:20
@Yinwei-Yu Yinwei-Yu changed the title 更新proto至最新,添加由于更新proto导致原有结构中缺失的字段,添加alter_collection_field方法及其相关测试 Update milvus rust sdk to milvus2.5 Jul 9, 2025
@SpadeA-Tang
Copy link

please use cargo fmt to format the project.

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>
@Yinwei-Yu Yinwei-Yu mentioned this pull request Aug 29, 2025
@Yinwei-Yu Yinwei-Yu closed this Aug 29, 2025
czs007 pushed a commit that referenced this pull request Aug 29, 2025
pr: #95
issue: #69
In this PR, I've added some missing functionalities to the current Rust
SDK, such as APIs for databases, authentication, and iterators.

---------

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants