1、查询别名
查询所有
GET /_alias
查询单个
GET /admin-service/_alias
2、创建别名
批量创建
POST /_aliases { "actions": [ { "add": { "index": "admin-service", "alias": "admin-service-log" } }, { "add": { "index": "user-service", "alias": "user-service-log" } } ] }
单个创建
PUT /admin-service/_alias/admin-service-log
3、修改别名
批量修改,删除后添加
POST /_aliases { "actions": [ { "remove": { "index": "admin-service", "alias": "admin-service-log" } }, { "add": { "index": "admin-service", "alias": "admin-service-log2" } } ] }
4、删除别名
批量删除
POST /_aliases { "actions": [ { "remove": { "index": "admin-service", "alias": "admin-service-log" } } ] }
单个删除
DELETE /admin-service/_alias/admin-service-log
参考博文:https://blog.csdn.net/qq330983778/article/details/102980861
标签:index,log,service,admin,别名,alias,ElasticSearch From: https://www.cnblogs.com/yangchongxing/p/16591019.html