From cb82b040a7db5b4586a8e6fe62aaf3fde49cb5a3 Mon Sep 17 00:00:00 2001 From: Chun Han <116052805+MrPresent-Han@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:55:57 +0800 Subject: [PATCH] enhance: support create collection with description(#40022) (#40028) related: #40022 pr: https://github.com/milvus-io/milvus/pull/40023 Signed-off-by: MrPresent-Han Co-authored-by: MrPresent-Han --- internal/distributed/proxy/httpserver/handler_v2.go | 2 ++ internal/distributed/proxy/httpserver/request_v2.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/distributed/proxy/httpserver/handler_v2.go b/internal/distributed/proxy/httpserver/handler_v2.go index 596d4593b6..437381f7c5 100644 --- a/internal/distributed/proxy/httpserver/handler_v2.go +++ b/internal/distributed/proxy/httpserver/handler_v2.go @@ -1399,6 +1399,7 @@ func (h *HandlersV2) createCollection(ctx context.Context, c *gin.Context, anyRe }, }, EnableDynamicField: enableDynamic, + Description: httpReq.Description, }) } else { collSchema := schemapb.CollectionSchema{ @@ -1407,6 +1408,7 @@ func (h *HandlersV2) createCollection(ctx context.Context, c *gin.Context, anyRe Fields: []*schemapb.FieldSchema{}, Functions: []*schemapb.FunctionSchema{}, EnableDynamicField: httpReq.Schema.EnableDynamicField, + Description: httpReq.Description, } allOutputFields := []string{} diff --git a/internal/distributed/proxy/httpserver/request_v2.go b/internal/distributed/proxy/httpserver/request_v2.go index ef50502f2f..771a031b27 100644 --- a/internal/distributed/proxy/httpserver/request_v2.go +++ b/internal/distributed/proxy/httpserver/request_v2.go @@ -505,6 +505,7 @@ type CollectionReq struct { Schema CollectionSchema `json:"schema"` IndexParams []IndexParam `json:"indexParams"` Params map[string]interface{} `json:"params"` + Description string `json:"description"` } func (req *CollectionReq) GetDbName() string { return req.DbName }