查询index记录
POST prod-lumi-demo3-alias*/_search
{"size": 1000,"query": {"match_all": {}},"sort": [{"ts": {"order": "desc"}}]
}
给指定index加上或者删除某一alias
POST /_aliases
{"actions": [{"add": {"index": "your_index_name", #"index": "*test*", #支持批量操作,正则匹配"alias": "your_alias_name"}}]
}
删除alias:
POST /_aliases
{"actions": [{"remove": {"index": "your_index_name","alias": "your_alias_name"}}]
}
GET /_cat/aliases?v #获取所有的alias
调接口的方式: curl -u username:password -XGET 'http://localhost:9200/_cat/aliases?v'