ElasticSearch版本號(hào):5.6.14,這個(gè)錯(cuò)誤和ES版本有一定的關(guān)系,還是先交代下版本號(hào),免得有的讀者根據(jù)我的方法操作后無效
錯(cuò)誤翻譯:
mapper_parsing_exception :映射解析異常
Root mapping definition has unsupported parameters :根映射定義包含不受支持的參數(shù)
錯(cuò)誤映射語句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
}
}
}
}
}
}
錯(cuò)誤映射語句2:
{
"mappings": {
"user": {
"properties": {
"birthday": {
"type": "date",
"store": true
},
"hobby": {
"type": "text",
"store": true
},
"id": {
"type": "long",
"store": true
},
"name": {
"type": "text",
"store": true
}
}
}
}
}
修改后的映射語句:文章來源:http://www.zghlxwxcb.cn/news/detail-503412.html
{
"properties": {
"birthday": {
"type": "date",
"store": true
},
"hobby": {
"type": "text",
"store": true
},
"id": {
"type": "long",
"store": true
},
"name": {
"type": "text",
"store": true
}
}
}
總結(jié)起來就是ES各個(gè)版本支持的映射語句結(jié)構(gòu)上存在一定的差異,不同版本有不同版本的語句寫法,參數(shù)有的版本支持,有的版本不支持。文章來源地址http://www.zghlxwxcb.cn/news/detail-503412.html
到了這里,關(guān)于ElasticSearch創(chuàng)建索引報(bào)錯(cuò):mapper_parsing_exception Root mapping definition has unsupported parameters的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!