Elasticsearch index alias 增加和删除

查看目标索引

get kibana_sample_data_ecommerce

查看目标索引有没有aliases

get _aliases

创建aliases

POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "kibana_sample_data_ecommerce",
        "alias": "ecommerce"
      }
    }
  ]
}

验证

get ecommerce/_search

get _aliases

 删除aliases

POST _aliases
{
  "actions": [
    {
      "remove": {
        "index": "kibana_sample_data_ecommerce",
        "alias": "ecommerce"
      }
    }
  ]
}

 

posted on 2021-11-15 14:54  InnoLeo  阅读(741)  评论(0编辑  收藏  举报