Elasticsearch is a JSON based noSQL database that is widely used for storing small scale data like data customer behavioural analysis, monitoring, etc. It is also very fast responsive database. Today we will be looking at how to list all indices in Elasticsearch in the Linux operating system.
Elasticsearch used hashing algorithm and an index is a collection of documents. When working with Elasticsearch it is evident that we would like to check the list of indices that are present in the elasticsearch and check the status of them.
View Elasticsearch Index Information:
In order to view the complete information of one particular index, just enter the following command in the Linux shell Terminal:
curl -XGET http://localhost:9200/index_name_here
Running this command will output the complete information of one particular index. It will also display all the data that are store inside this index.
List all Indices in Elasticsearch:
To list all the indices that are present in the Elasticsearch, open the Linux shell terminal and enter the following command:
curl -XGET http://localhost:9200/_cat/indices
This will list all the indices present in the elasticsearch and will be displayed like the following: