fix: Fix error message for indexing (#29898)

issue: #29897

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2024-01-12 19:44:51 +08:00 committed by GitHub
parent 565fc3a019
commit 8c89ad694e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -1343,8 +1343,8 @@ class TestIndexInvalid(TestcaseBase):
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)