enhance: support create collection with description(#40022) (#40028)

related: #40022
pr: https://github.com/milvus-io/milvus/pull/40023

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
pull/40048/head^2
Chun Han 2025-02-24 09:55:57 +08:00 committed by GitHub
parent 6c81463263
commit cb82b040a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -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{}

View File

@ -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 }