diff --git a/internal/proxy/task_index.go b/internal/proxy/task_index.go index b10feece36074..43add9b112f61 100644 --- a/internal/proxy/task_index.go +++ b/internal/proxy/task_index.go @@ -171,7 +171,7 @@ func (cit *createIndexTask) parseIndexParams() error { } else { return merr.WrapErrParameterInvalid("supported field", fmt.Sprintf("create index on %s field", cit.fieldSchema.DataType.String()), - "create index on json field is not supported") + fmt.Sprintf("create index on %s field is not supported", cit.fieldSchema.DataType.String())) } } diff --git a/tests/python_client/testcases/test_index.py b/tests/python_client/testcases/test_index.py index c951c2300a705..fe094538ae443 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -1343,8 +1343,8 @@ def test_create_index_json(self): dim=ct.default_dim, is_index=False)[0:4] collection_w.create_index(ct.default_json_field_name, index_params=ct.default_flat_index, check_task=CheckTasks.err_res, - check_items={ct.err_code: 1, - ct.err_msg: "create index on json field is not supported"}) + check_items={ct.err_code: 1100, + ct.err_msg: "create index on JSON field is not supported"}) @pytest.mark.tags(CaseLabel.GPU)