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

related: #40022

Signed-off-by: MrPresent-Han <chun.han@gmail.com>
Co-authored-by: MrPresent-Han <chun.han@gmail.com>
This commit is contained in:
Chun Han
2025-02-20 22:31:53 +08:00
committed by GitHub
co-authored by MrPresent-Han
parent aba39ff98f
commit 1dc31619f8
2 changed files with 3 additions and 0 deletions
@@ -1410,6 +1410,7 @@ func (h *HandlersV2) createCollection(ctx context.Context, c *gin.Context, anyRe
},
},
EnableDynamicField: enableDynamic,
Description: httpReq.Description,
})
} else {
collSchema := schemapb.CollectionSchema{
@@ -1418,6 +1419,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{}
@@ -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 }