stefanobaldo
stefanobaldo

Reputation: 2063

Delete all documents of a type in Amazon Elasticsearch

How can I delete all documents from a specific type in Amazon Elasticsearch Service?

I used to do that by using the delete_by_query plugin, but Amazon does not allow any custom plugin installation.

Will I really have to do it one by one?

Upvotes: 1

Views: 4013

Answers (2)

MosheZada
MosheZada

Reputation: 2399

Starting from last month AWS started to support ES5 announcement.

And delete_by_query become a native endpoint on ES5 so you doesn't need custom plugin for deleting docs by query

delete_by_query docs

Upvotes: 2

chocomuesli
chocomuesli

Reputation: 324

You should still be able to run queries against the DELETE-API, e.g.

curl -XDELETE http://<es-node>:9200/<index>/<type>

This works fine for us with version 1.7.x in AWS. I know they made some changes how to process deleted data, but this should be working. Your feedback will be appreciated :)

Cheers, Dominik

Upvotes: 0

Related Questions