How can I delete all the duplicate records except one to keep my data?

The reindex doc says:

Reindex can also use the Ingest node feature by specifying a pipeline...

So you should try:

curl -XPOST -H "Content-Type: application/json" http://10.10.10.21:9200/_reindex?pretty -d '
{
  "source": {
    "index": "blockchain"
  },
  "dest": {
    "index": "blockchain3",
    "pipeline": "set_id"
  }
}'
1 Like