Repository navigation
feat: V2 examples, deprecate function DTOs, hybrid search function chains, ListCompactionTasks - #610
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
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #610 +/- ##
===========================================
+ Coverage 53.47% 89.72% +36.24%
===========================================
Files 52 393 +341
Lines 4432 16841 +12409
Branches 0 1851 +1851
===========================================
+ Hits 2370 15110 +12740
+ Misses 2062 1731 -331
🚀 New features to boost your workflow:
|
yhmo
commented
Sep 28, 2026
yhmo
commented
Sep 28, 2026
yhmo
commented
Sep 29, 2026
yhmo
commented
Sep 29, 2026
yhmo
commented
Sep 29, 2026
yhmo
commented
Sep 30, 2026
yhmo
commented
Sep 30, 2026
yhmo
commented
Sep 30, 2026
yhmo
commented
Sep 30, 2026
yhmo
commented
Sep 30, 2026
yhmo
commented
Sep 30, 2026
…hains, ListCompactionTasks, deprecate function request DTOs - deprecate AddCollectionFunctionRequest and DropCollectionFunctionRequest in favor of AddFunctionFieldRequest/DropFunctionFieldRequest (pymilvus parity) - add examples/src/v2 alias.cpp, partition.cpp and index.cpp demonstrating the alias, partition and index management APIs - general.cpp: demonstrate delete-by-ids, delete-by-filter, truncate and rename - add_field.cpp: demonstrate AlterCollectionFieldProperties on an added field - db.cpp: demonstrate AlterDatabaseProperties and DropDatabaseProperties - index.cpp: insert a small row batch and flush before building indexes so describeIndex() reports meaningful indexed/total rows - HybridSearchRequest: add FunctionChains()/SetFunctionChains/ WithFunctionChains()/AddFunctionChain(); Validate() rejects function chains combined with a rerank and requires either one; the pre-callback converts each chain into the proto (pymilvus hybrid_search function_chains parity) - ListCompactionTasks: new ListCompactionTasksRequest + MilvusClientV2:: ListCompactionTasks facade that lists all retained compaction tasks of a collection via GetCompactionStateWithPlans (pymilvus list_compaction_tasks) - bump pinned milvus-proto to ae7fea6 so GetCompactionPlansRequest carries db_name/collection_name (also adds GetPersistentSegmentInfoRequest.states) - DqlUtils: guard the rerank param mapping for a null rerank function - CompactionPlan: expose the full CompactionMergeInfo surface (plan_id, trigger_id, collection_id, partition_id, channel, type, state, failure_reason, targets) and CompactionType/CompactionTaskState enums; GetCompactionPlansResponse gains CollectionName() (pymilvus Plan parity) - extract shared ValidateFunctionChains() used by SearchRequest and HybridSearchRequest so both enforce the limit/offset op-param checks - reuse MilvusConnection::GetCompactionPlans for ListCompactionTasks instead of a duplicate GetCompactionStateWithPlans wrapper - add unit tests and mocked tests covering the new request members, validation, collection_name, the full plan fields, and hybrid function chains on the wire request - examples/README.md: fix partition example to reference GetPartitionStatistics - test: switch system-test MinIO image to milvusdb/minio:RELEASE.2024-05-28T17-19-04Z (quay.io/minio image is not pullable in CI, failing the coverage job) 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.
Summary
A single PR consolidating the V2 example/deprecation work together with two pymilvus-parity gaps. All changes are additive; no existing API behavior changes (one pure-virtual addition noted below).
Changes
New V2 examples (
examples/src/v2/)alias.cpp: CreateAlias, ListAliases, DescribeAlias, AlterAlias, DropAliaspartition.cpp: CreatePartition, HasPartition, LoadPartitions, GetPartitionStatistics, ReleasePartitions, DropPartitionindex.cpp: CreateIndex, ListIndexes, DescribeIndex, AlterIndexProperties, DropIndexProperties, DropIndex (inserts a small row batch so describeIndex reports real rows)Updated V2 examples
general.cpp: delete-by-ids, delete-by-filter, TruncateCollection, RenameCollection (with cleanup for the renamed leftover so it is rerun-safe)add_field.cpp: AlterCollectionFieldProperties on a newly added fielddb.cpp: AlterDatabaseProperties / DropDatabasePropertiesexamples/README.md: register the new binaries; fix partition entry toGetPartitionStatistics()Deprecations
AddCollectionFunctionRequest/DropCollectionFunctionRequest: marked@deprecated(docs only, no compile warnings), pointing toAddFunctionField/DropFunctionFieldNew public APIs (pymilvus parity)
HybridSearchRequest:FunctionChains()/SetFunctionChains/WithFunctionChains/AddFunctionChain;Validate()accepts rerank or function chains (mutually exclusive); the pre-callback serializes chains onto the wireListCompactionTasks(ListCompactionTasksRequest+MilvusClientV2::ListCompactionTasks): lists all retained compaction tasks of a collection viaGetCompactionStateWithPlansCompactionPlan: fullCompactionMergeInfosurface (plan_id, trigger_id, collection_id, partition_id, channel, type, state, failure_reason, targets) plusCompactionType/CompactionTaskStateenums;GetCompactionPlansResponsegainsCollectionName()ValidateFunctionChains()shared bySearchRequestandHybridSearchRequest(now enforces limit/offset op-param checks in both)Infra
milvus-prototoae7fea6(addsdb_name/collection_name/collection_idtoGetCompactionPlansRequest; also addsGetPersistentSegmentInfoRequest.states)milvusdb/minio:RELEASE.2024-05-28T17-19-04Zbecausequay.io/minio/minio:RELEASE.2025-09-07T16-13-09Zreturnsunauthorizedon pull and was failing the coverage CI jobAPI surface note
MilvusClientV2gains one new pure virtual methodListCompactionTasks. Callers usingCreate()are unaffected; any external subclass/mock ofMilvusClientV2must add the override.Testing
testing-utandtesting-itpass; clang-format/cpplint clean.Signed-off-by: yhmo yihua.mo@zilliz.com