reason": "Root mapping definition has unsupported parameters:
quot root has Mapping unsupported parameters definition reason
2023-09-14 09:08:18 时间
1、在Kibana创建索引的时候报错,使用的elasticsearch版本是7.2.1版本。
1 PUT /person 2 { 3 "settings": { 4 "number_of_shards": "10", 5 "number_of_replicas": "0", 6 "refresh_interval": "-1" 7 }, 8 "mappings": { 9 "properties": { 10 "update_time": { 11 "format": "yyyy-MM-dd HH:mm:ss", 12 "type": "date" 13 }, 14 "username": { 15 "type": "keyword" 16 }, 17 "address": { 18 "type": "keyword" 19 } 20 } 21 } 22 }
报错,如下所示:
1 { 2 "error": { 3 "root_cause": [{ 4 "type": "mapper_parsing_exception", 5 "reason": "Root mapping definition has unsupported parameters: [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]" 6 }], 7 "type": "mapper_parsing_exception", 8 "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]", 9 "caused_by": { 10 "type": "mapper_parsing_exception", 11 "reason": "Root mapping definition has unsupported parameters: [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]" 12 } 13 }, 14 "status": 400 15 }
具体原因是ElasticSearch 7.x 默认不在支持指定索引类型。所以在ElasticSearch 7.x中不指定索引类型,创建索引是成功的。
但是对于ElasticSearch 6.x执行时没有问题的,Elasticsearch7默认不在支持指定索引类型,默认索引类型是_doc,索引不再推荐创建索引类型了,使用默认的即可。因为elasticsearch8后就不在提供该字段。
相关文章
- 注册表-在IE上永久显示我的名字"www.baidu.com - 朱建强"
- VS2013 "当前不会命中断点.还没有为该文档家在任何符号" 解决办法
- 博客园“可运行"代码
- [Python] Boolean Or "Mask" Index Arrays filter with numpy
- fastadmin密码输错多次提示"请于一天后登录"
- Python - 属性简介"__name__"
- [Angular] Isolate Scope "@"
- fastadmin密码输错多次提示"请于一天后登录"
- loadrunner11 错误:Error -26377: No match found for the requested parameter XXXX. web_custom_request(XXX) highest severity level was "ERROR",....... [MsgId: MMSG-26387]
- Atitit. Exception in thread "main" java.lang.Error: Unresolved compilation problem:
- vmware安装ubuntu " Intel VT-x 处于禁用状态"
- jni项目创建出错 Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurfac
- the usage of linux command "expect"
- SUSE 在Intel举行"Rule The Stack"的竞赛中获得 "Openstack安装最高速"奖
- 2017"百度之星"程序设计大赛 - 初赛(A)