You can use REINDEX to do that.
Reindex does not attempt to set up the destination index. It does not
copy the settings of the source index. You should set up the
destination index prior to running a _reindex action, including
setting up mappings, shard counts, replicas, etc.
- First copy the index to a new name
POST /_reindex
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter"
}
}
- Now delete the Index
DELETE /twitter