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.
Let’s ensure that the index was deleted correctly by listing all of the indexes within our cluster.
health status index pri rep docs.count docs.deleted store.size pri.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.
Learn Elasticsearch today!
Take an online course and become an Elasticsearch champion!
Here is what you will learn:
- The architecture of Elasticsearch
- Mappings and analyzers
- Many kinds of search queries (simple and advanced alike)
- Aggregations, stemming, auto-completion, pagination, filters, fuzzy searches, etc.
- ... and much more!