转自:https://blog.csdn.net/Peter_S/article/details/90377027
思路:建一个新表,并将原表数据复制到新表,删除原表
用kibana举个例子;
PUTtest2 -----------------原表
{
"mappings": {
"test1": {
"properties": {
"sort": {
"type": "float"
}
}
}
}
}
PUT test1 ------------------新表
{
"mappings": {
"test1": {
"properties": {
"sort": {
"type": "number"
}
}
}
}
}
POST _reindex --------------传输数据
{
"source": {
"index": "test2"
},
"dest": {
"index": "test1"
}
}
DELETE test2 ----------------删除表