【发布时间】:2015-01-16 21:59:29
【问题描述】:
我需要将 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}
但是状态字段的类型没有改变。请帮我这样做
【问题讨论】:
标签: node.js elasticsearch