今天发现在5.5.1版本下修改字段mapping添加fielddata:true参数 一直报错提示不支持,5.4版本都没有问题,不知问题何在.求科普;
拿id字段来说 原来mapping定义如下:
结果:
拿id字段来说 原来mapping定义如下:
"id":{
"type":"long",
"index":"not_analyzed",
}
按id排序时提示,需要设置fielddata=true,所以准备更新字段mapping如下: curl -XPOST "http://127.0.0.1/test/test/_mapping?pretty" -d '{
"test": {
"properties": {
"id":{
"type":"long",
"index":"not_analyzed",
"fielddata":true
}
}
}
}'
结果:
{
"error" : {
"root_cause" : [
{
"type" : "mapper_parsing_exception",
"reason" : "Mapping definition for [id] has unsupported parameters: [fielddata : true]"
}
],
"type" : "mapper_parsing_exception",
"reason" : "Mapping definition for [id] has unsupported parameters: [fielddata : true]"
},
"status" : 400
}
2 个回复
Cheetah
赞同来自:
kennywu76 - Wood
赞同来自: