Delete all elasticsearch indices directly without curl

Viewed 7467

I am starting elasticsearch, and getting the error:

java.lang.IllegalStateException: unable to upgrade the mappings for the index [[documents/xOOEXQB-RzGhQp7o7NNH9w]]
    at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkMappingsCompatibility(MetaDataIndexUpgradeService.java:172) ~[elasticsearch-5.5.0.jar:5.5.0]

I am not exactly sure what caused this to happen. I did do a brew upgrade elasticsearch but I didn't note down the last version. I am currently on elasticsearch 5.5.

I would like to just clear away all the mappings/indices for elasticsearch. I don't need these data as it is for testing. Most of the documentation says to use

curl -XDELETE 'http://localhost:9200/_all'

However, localhost:9200 isn't reachable (it was previously), presumably because elasticsearch cannot be properly started so it is a bit of chicken and egg.

Is there a way for me to clear away all elasticsearch data manually?

1 Answers
Related