我需要更新elasticsearch字段类型整数到long我尝试了以下方式,它不起作用
curl -XPUT 'http://localhost:9200/testwork/_mapping/message?ignore_conflicts=true' -d '
{
"message" : {
"properties" : {
"status" : {"type" : "long"}
}
}
}
'
当没有ignore_conflicts参数尝试时,它会得到错误
{"error":"MergeMappingException[Merge failed with failures {[mapper [status] of different type, current_type [integer], merged_type [long]]}]","status":400}
但是使用ignore_conflicts参数得到响应时不会出错
{"acknowledged":true}
但是状态字段的类型没有改变。请帮我这样做