获取ElasticSearch索引列表

查询索引列表信息并格式化为json:

http://127.0.0.1:9021/_cat/indices?format=json&index=[索引名称,可使用通配符]

执行后获取到的结果集如下:

[
    {
        "health": "green",
        "status": "open",
        "index": "[此处为你的索引名称]",
        "uuid": "towtsSEnQR6hqOTDDsWdig",
        "pri": "5",
        "rep": "1",
        "docs.count": "25",
        "docs.deleted": "0",
        "store.size": "258.4kb",
        "pri.store.size": "258.4kb"
    },
    {
        ......
    }
]

 

posted @ 2020-03-30 13:22  夏天の风  阅读(11514)  评论(0编辑  收藏  举报