elasticsearchHow do I list all the indexes in Elasticsearch?
To list all the indexes in Elasticsearch, you can use the _cat
API. The _cat
API provides a convenient way to interact with the cluster and retrieve information about the nodes, indices, and shards.
Example
$ curl -XGET 'localhost:9200/_cat/indices?v'
Output example
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open test_index XXXXXXXXXXXXXXXXXX 5 1 0 0 5.3kb 5.3kb
The _cat/indices
API provides the following information about each index:
health
: The health status of the index (green, yellow, or red).status
: Whether the index is open or closed.index
: The name of the index.uuid
: A unique identifier for the index.pri
: The number of primary shards in the index.rep
: The number of replica shards in the index.docs.count
: The number of documents in the index.docs.deleted
: The number of deleted documents in the index.store.size
: The size of the index in bytes.pri.store.size
: The size of the primary shards in bytes.
For more information, please refer to the Elasticsearch documentation.
More of Elasticsearch
- How can I use elasticsearch zone awareness to improve my software development?
- How can I use Elasticsearch and ZFS together?
- How can I use Elasticsearch to diagnose "yellow" issues?
- How can I get started with using Elasticsearch OSS?
- How do I decide whether to use a keyword or text field when indexing documents in Elasticsearch?
- How can I use Elasticsearch and Zookeeper together to manage distributed applications?
- How can I use Elasticsearch and Zabbix together for software development?
- How can I use YouTube to learn about Elasticsearch?
- How can I set up and use Elasticsearch on the Yandex Cloud platform?
- How do I configure elasticsearch to use an XMS memory allocator?
See more codes...