ElasticSearch创建索引报错:mapper_parsing_exception Root mapping definition has unsupported parameters
错误翻译:mapper_parsing_exception:映射解析异常Root mapping definition has unsupported parameters:根映射定义包含不受支持的参数错误映射语句:{"test_0904": {"mappings": {"user": {"properties": {"birthday": {.
·
ElasticSearch版本号:5.6.14,这个错误和ES版本有一定的关系,还是先交代下版本号,免得有的读者根据我的方法操作后无效
错误翻译:
mapper_parsing_exception :映射解析异常
Root mapping definition has unsupported parameters :根映射定义包含不受支持的参数
错误映射语句1:
{
"test_0904": {
"mappings": {
"user": {
"properties": {
"birthday": {
"type": "date",
"store": true
},
"hobby": {
"type": "text",
"store": true
},
"id": {
"type": "long",
"store": true
},
"name": {
"type": "text",
"store": true
}
}
}
}
}
}
错误映射语句2:
{
"mappings": {
"user": {
"properties": {
"birthday": {
"type": "date",
"store": true
},
"hobby": {
"type": "text",
"store": true
},
"id": {
"type": "long",
"store": true
},
"name": {
"type": "text",
"store": true
}
}
}
}
}
修改后的映射语句:
{
"properties": {
"birthday": {
"type": "date",
"store": true
},
"hobby": {
"type": "text",
"store": true
},
"id": {
"type": "long",
"store": true
},
"name": {
"type": "text",
"store": true
}
}
}
总结起来就是ES各个版本支持的映射语句结构上存在一定的差异,不同版本有不同版本的语句写法,参数有的版本支持,有的版本不支持。
更多推荐
已为社区贡献13条内容
所有评论(0)