Delete duplicate items

Hi, all,

I use Elastic Search to store some JSON data like the following:

"_index" : "normalized",
"_type" : "90A2DAFB0621",
"_id" : "Fri Sep 12 16:59:50 UTC 2014",
"_score" : 1.0,

I changed how "_id" is calculated in my program later on. Then, in the old data sets, there are two duplicated items for older data. I was able to find the duplicated items using the aggregation API:

"aggs": {
"types": {
"terms": {
"field": "_type"
"aggs": {
"dups": {
"histogram": {
"field": "id",
"interval": 1,
"min_doc_count": 2

I can remove the old data one by one using the delete API. But I wonder if there are any better solutions.

Thanks a lot for your help!


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit