| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 500 | 1270001 | 系统内部错误 | 联系系统开发人员协助定位 |
| 400 | 1270002 | 参数错误 | 根据错误信息和文档排查非法参数 |
| 500 | 1270003 | 调用失败 | 如果重试后仍然失败,请联系系统开发人员 |
| 400 | 1270005 | 该功能仅对旗舰版可用 | 请联系销售人员升级套餐以使用此高级功能 |
| 400 | 1274001 | 未定义的特殊字段 | 检查以下划线开头的字段是否是[_item_id,_update_time,_update_time,_title] 之一 |
| 400 | 1274002 | 定义的字段名称重复 | 修改重复字段 |
| 400 | 1274003 | 定义了特殊字段(如:_title,_create_time,_update_time),但是类型属性未定义 | 完善对应字段的类型 |
| 400 | 1274004 | 字段可搜索属性配置错误 | 根据返回信息变更字段属性 |
| 400 | 1274005 | 字段可排序属性配置错误 | 根据返回信息变更字段属性 |
| 400 | 1274006 | 特定类型字段的type_definitions属性为空 | 完善字段 |
| 400 | 1274007 | 超过数量限制 | 根据返回信息修改请求参数 |
| 400 | 1274009 | 字段搜索表现冲突 | 字段is_searchable和is_isreturnable保持一致 |
| 400 | 1274008 | 字段和类型不匹配 | 检查字段的名称是否可以设置为对应类型 |
| 400 | 1274010 | 字段名称不符合规范 | 检查对应字段是否包含非法字符和长度是否合规 |
curl --location --request POST '/search/v2/schemas?validate_only=' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"display": {
"card_key": "search_common_card",
"fields_mapping": [
{
"data_field": "${priority}",
"display_field": "tag1"
},
{
"data_field": "${description}",
"display_field": "summary"
}
]
},
"properties": [
{
"is_returnable": true,
"is_searchable": true,
"name": "description",
"type": "text",
"search_options": {
"enable_camel_match": false,
"enable_exact_match": false,
"enable_number_suffix_match": false,
"enable_prefix_match": false,
"enable_semantic_match": true
}
},
{
"is_returnable": true,
"name": "icon_url",
"type": "text"
},
{
"name": "rank",
"type": "int",
"sort_options": {
"order": "asc",
"priority": 0
}
},
{
"is_returnable": true,
"name": "priority",
"type": "tag",
"type_definitions": {
"tag": [
{
"color": "red",
"name": "type",
"text": "type"
}
]
}
}
],
"schema_id": "example_schema",
"validate_only": false
}'{
"code": 0,
"data": {
"schema": {
"display": {
"card_key": "search_common_card",
"fields_mapping": [
{
"data_field": "${priority}",
"display_field": "tag1"
},
{
"data_field": "${description}",
"display_field": "summary"
}
]
},
"properties": [
{
"is_returnable": true,
"is_searchable": true,
"name": "description",
"search_options": {
"enable_camel_match": false,
"enable_exact_match": false,
"enable_number_suffix_match": false,
"enable_prefix_match": false,
"enable_semantic_match": true
},
"type": "text"
},
{
"is_returnable": true,
"name": "icon_url",
"type": "text"
},
{
"name": "rank",
"sort_options": {
"order": "asc"
},
"type": "int"
},
{
"is_returnable": true,
"name": "priority",
"type": "tag",
"type_definitions": {
"tag": [
{
"color": "red",
"name": "type",
"text": "type"
}
]
}
}
],
"schema_id": "example_schema"
}
},
"msg": "success"
}