Repository navigation
feat: add IndexParam for index creation and deprecate IndexDesc-based request input - #608
Merged
Merged
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #608 +/- ##
===========================================
+ Coverage 53.47% 89.69% +36.22%
===========================================
Files 52 391 +339
Lines 4432 16722 +12290
Branches 0 1841 +1841
===========================================
+ Hits 2370 14999 +12629
+ Misses 2062 1723 -339
🚀 New features to boost your workflow:
|
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
force-pushed
the
ma
branch
2 times, most recently
from
September 18, 2026 08:20
a239d11 to
89bb492
Compare
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
commented
Sep 18, 2026
yhmo
force-pushed
the
ma
branch
2 times, most recently
from
September 20, 2026 06:39
18d121a to
1934fcb
Compare
yhmo
commented
Sep 20, 2026
yhmo
commented
Sep 20, 2026
yhmo
commented
Sep 20, 2026
… request input Signed-off-by: yhmo <yihua.mo@zilliz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Introduce a dedicated
IndexParamtype for index-creation input so the C++ SDK matches the Java/Rust SDKs, wherecreateIndextakesIndexParamanddescribeIndexreturnsIndexDesc. Previously the C++ SDK reusedIndexDesc(the describe type) as the create-index input.What changes
milvus::IndexParam(src/include/milvus/types/IndexParam.h): creation-only fieldsfield_name/index_name/index_type/metric_type/extra_params.CreateIndexRequestandCreateCollectionRequest(inline index creation) gainIndexParams()/SetIndexParams()/WithIndexParams()/AddIndexParam()to build multiple indexes fromIndexParam.IndexDesc-based accessors (Indexes()/SetIndexes()/WithIndexes()/AddIndex()) are marked[[deprecated]]but remain functional: deprecated setters forward into theIndexParamlist, and the deprecatedIndexes()getter derives theIndexDescview on demand, so existing callers keep working without a source break (single source of truth).MilvusClientV2::CreateIndex/CreateCollectionsignatures are unchanged; the impl builds the create-index RPC fromIndexParamentries.Verification
testing-ut: 923 tests passedtesting-it(mocked): CreateIndex/CreateCollection suites passedtesting-st(system tests) compilesNotes
AddFunctionFieldRequest::WithIndexstill usesIndexDesc(unchanged).Indexes()getter onCreateIndexRequest/CreateCollectionRequestreturns by value (previously aconst&).auto& v = req.Indexes();no longer compiles andconst auto& vnow binds a snapshot rather than a live view; code should migrate toIndexParams(). Updating the deprecated accessors' shape is intentional so the two getters share one source of truth.