錯誤信息如下:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters。
公司ES集羣升級7.10版本,之前古老程序在創建mapping的時候報錯。隨早知道移除type這個東西,碰到後到官網看了看,具體連接地址:Removal of mapping types | Elasticsearch Guide [7.16] | Elastic
修正方法:
"mappings":{
"xx_type": {
"properties": {}
}
}
移除創建mapping下的xx_type即可;