Elasticsearch reindex range

Hi, in my index template "clientip" field is text. so I need to reindex the indices.
It's been about 2 months and indices are create every day:

logstash-vod-2020.04.14
logstash-vod-2020.04.13

In docs I see I should use something like this:

POST _reindex
{
"source": {
"index": "twitter"
},
"dest": {
"index": "new_twitter",
}
}

How can I write some loop or script that takes the dates and starts to reindex ?
How can I change only "clientip" data type from text to ip ?
It's my first time in ES reindex, I guess this "dest" index is kind of temp and I should change the name of it to what is was before. I mean logstash-vod-2020.04.14 will reindex to logstash-vod-2020.04.14_new, logstash-vod-2020.04.14 will be deleted, logstash-vod-2020.04.14_new will renamed to logstash-vod-2020.04.14. Am I right ?
That was a long question, thank you so much :sweat_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.