Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to t
完整报错信息
(Python3.6) appleyuchi@Desktop:~/桌面/Flink_Code/flink清洗数据案例/FlinkProj$ ./kibana.sh
{“acknowledged”:true}{“acknowledged”:true,”shards_acknowledged”:true,”index”:”auditindex”}{
“error” : {
“root_cause” : [
{
“type” : “illegal_argument_exception”,
“reason” : “Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.”
}
],
“type” : “illegal_argument_exception”,
“reason” : “Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.”
},
“status” : 400
}
解决方案:
url -H "Content-Type: application/json" -XPOST 'http://master:9200/auditindex/audittype/_mapping?pretty' -d '
{
"audittype":{
"properties":{
"area":{"type":"keyword"},
"type":{"type":"keyword"},
"count":{"type":"long"},
"time":{"type":"date","format": "yyyy-MM-dd HH:mm:ss"}
}
}
}
'
改成
curl -H "Content-Type: application/json" -XPOST 'http://Desktop:9201/auditindex/audittype/_mapping?include_type_name=true' -d '
{
"audittype":{
"properties":{
"area":{"type":"keyword"},
"type":{"type":"keyword"},
"count":{"type":"long"},
"time":{"type":"date","format": "yyyy-MM-dd HH:mm:ss"}
}
}
}
'
最终正确的信息如下:
(Python3.6) appleyuchi@Desktop:~/桌面/Flink_Code/flink清洗数据案例/FlinkProj$ ./kibana.sh
{“acknowledged”:true}{
“acknowledged” : true,
“shards_acknowledged” : true,
“index” : “auditindex”
}
Reference:
[1]elasticsearch7.x遇到的bug汇总
还没有评论,来说两句吧...