I'm new to ElasticSearch. I'm trying to figure out how to remove data from ElasticSearch. I have deleted my indexes. However, that doesn't seem to actually remove the data itself. The other stuff I've seen points to the Delete by Query feature. However, I'm not even sure what to query on. I know my indexes. Essentially, I'd like to figure out how to do a
DELETE FROM [Index]
From PostMan in Chrome. However, I'm not having any luck. It seems like no matter what I do, the data hangs around. Thus far, I've successfully deleted the indexes by using the DELETE HTTP Verb in PostMan and using a url like:
http://localhost:9200/[indexName]
However, that doesn't seem to actually remove the data (aka docs) themselves.
Yes, deleting the index, deletes all the data in that index.
Elasticsearch lets you specify time-to-live for each added document, which means after that time has passed, the document is automatically deleted. This is very useful for certain applications, but it will cause heavy deletions over time.
If you ever need to delete all the indexes, this may come in handy:
curl -X DELETE 'http://localhost:9200/_all'
Powershell:
Invoke-WebRequest -method DELETE http://localhost:9200/_all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With