List all indexes on ElasticSearch server?

前端 未结 23 1176
被撕碎了的回忆
被撕碎了的回忆 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:10

    You can also get specific index using

    curl -X GET "localhost:9200/"
    e.g.   curl -X GET "localhost:9200/twitter"
    You may get output like:
    {
      "twitter": {
         "aliases": { 
    
         },
         "mappings": { 
    
         },
         "settings": {
         "index": {
            "creation_date": "1540797250479",
            "number_of_shards": "3",
            "number_of_replicas": "2",
            "uuid": "CHYecky8Q-ijsoJbpXP95w",
            "version": {
                "created": "6040299"
            },
           "provided_name": "twitter"
          }
        }
      }
    }
    

    For more info

    https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html

提交回复
热议问题