随笔 - 597  文章 - 4  评论 - 445  阅读 - 424万

reason": "Root mapping definition has unsupported parameters:

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后就不在提供该字段。

posted on   别先生  阅读(864)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
历史上的今天:
2016-08-13 Javascript中DOM技术的的简单学习
2016-08-13 Javascript中String对象的的简单学习
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示