mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
enhance: [2.4] Prevent generate "null" search params (#37811)
Some checks are pending
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Waiting to run
Build and test / UT for Cpp (push) Blocked by required conditions
Build and test / UT for Go (push) Blocked by required conditions
Build and test / Integration Test (push) Blocked by required conditions
Build and test / Upload Code Coverage (push) Blocked by required conditions
Some checks are pending
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Waiting to run
Build and test / UT for Cpp (push) Blocked by required conditions
Build and test / UT for Go (push) Blocked by required conditions
Build and test / Integration Test (push) Blocked by required conditions
Build and test / Upload Code Coverage (push) Blocked by required conditions
pr: #37812 Preventing generating null search params in restful search request Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
ebfd917bb6
commit
cffde80e68
@ -943,6 +943,9 @@ func generatePlaceholderGroup(ctx context.Context, body string, collSchema *sche
|
||||
|
||||
func generateSearchParams(ctx context.Context, c *gin.Context, reqSearchParams searchParams) []*commonpb.KeyValuePair {
|
||||
var searchParams []*commonpb.KeyValuePair
|
||||
if reqSearchParams.Params == nil {
|
||||
reqSearchParams.Params = make(map[string]any)
|
||||
}
|
||||
bs, _ := json.Marshal(reqSearchParams.Params)
|
||||
searchParams = append(searchParams, &commonpb.KeyValuePair{Key: Params, Value: string(bs)})
|
||||
searchParams = append(searchParams, &commonpb.KeyValuePair{Key: common.IgnoreGrowing, Value: strconv.FormatBool(reqSearchParams.IgnoreGrowing)})
|
||||
|
Loading…
Reference in New Issue
Block a user