Deleting an Index

This entry is part 7 of 35 in the series Complete Guide to Elasticsearch

Now that we have created an index, let’s see how we can delete an index. In fact, we are going to delete the index that we created in the previous article in this series and add it again later.

Open the Sense plugin for Kibana and simply issue the below request to delete the index.

DELETE /ecommerce

Let’s ensure that the index was deleted correctly by listing all of the indexes within our cluster.

GET /_cat/indices?v


health status index pri rep docs.count docs.deleted store.size
yellow open .kibana 1 1 2 0 5kb 5kb

As you can see, we no longer have an index with a name of ecommerce. Thanks to the REST API that Elasticsearch exposes, it is really that easy to delete an index in Elasticsearch.

Series Navigation<< Creating an IndexIntroduction to Mapping >>

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *