{
"properties":{
"device":{
"type":"object",
"properties":{
"id":{
"type":"keyword"
},
"value":{
"type":"keyword"
}
}
}
}
}
我想将Map值更新为文本,当我尝试使用https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html更新时抛出错误。“不同类型的Map器[设备.值],current_type [关键字],merged_type [文本]”
{
"properties":{
"device":{
"type":"object",
"properties":{
"id":{
"type":"keyword"
},
"value":{
"type":"text"
}
}
}
}
}
有人帮我更新索引从关键字到文本?
1条答案
按热度按时间3hvapo4f1#
更改字段类型是一项重大更改,您需要
1.使用新的必需Map创建新索引。
1.使用reindex API将数据从旧索引移动到新索引(如果您不介意数据丢失,则为可选)