ES字段更改遷移老數據

ES版本6.6.2 用kibana說明

1.1-----------------原表

index爲test2,type爲test1

PUT  test2                                                            
{
    "mappings": {
      "test1": {
        "properties": {
          "sort": {
            "type": "float"
          }
        }
      }
    }
}

 

1.2-------------- 新表

index爲test1,type爲test1

PUT test1                      
{
    "mappings": {
      "test1": {
        "properties": {
          "sort": {
            "type": "number"
          }
        }
      }
    }
}

1.3----------- 傳輸數據

POST _reindex                    
{
  "source": {
    "index": "test2"
  },
  "dest": {
    "index": "test1"
  }
}

1.4-------------刪除表

DELETE test2         

原文鏈接:https://blog.csdn.net/Peter_S/article/details/90377027

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章