How to Delete Data from Elasticsearch


(Jeff23) #1

Hello,

I am new in Elasticsearch, I need to delete data from a cluster. This is what I use to query the data from Dremio:

SELECT * FROM data1."mydoc".doc

How can I delete "mydoc" from Elasticsearch??

I have more information in Elasticsearch that cannot be deleted. I need to be very careful while deleting the data.

Please let me know if more information is needed.

I appreciate any help with this request.

Thank you and regards.


(Mark Walkom) #2

https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html is what you want. But it's expensive to run and you should take a backup as well.