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"
      }
    }
  ]
}

 

上一篇:GitHub惊险华为高T级架构师“ELK进阶笔记”,标星36k文档限时开源


下一篇:在docker里安装elasticsearch和Kibana