List all indexes on ElasticSearch server?

前端 未结 23 1103
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 09:55

I would like to list all indexes present on an ElasticSearch server. I tried this:

curl -XGET localhost:9200/

but it just gives me this:

23条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 10:20

    _stats/indices gives the result with indices.

    $ curl -XGET "localhost:9200/_stats/indices?pretty=true"
    {
      "_shards" : {
        "total" : 10,
        "successful" : 5,
        "failed" : 0
      },
      "_all" : {
        "primaries" : { },
        "total" : { }
      },
      "indices" : {
        "visitors" : {
          "primaries" : { },
          "total" : { }
        }
      }
    }
    

提交回复
热议问题