Copy daily indices with new mappings

Hi,

I'm trying to reindex my data using the _reindex feature.

Prior to this I wan't to create the daily indices with new mappings.

How can I automatically extract the current daily name, add _v2 to the name and add a new mapping for each of the indices?

One of the old indices and mapping:
{
"sipdump-2018-04-30": {
"aliases": {},
"mappings": {
"Info": {
"properties": {
"from_server": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
}

What I'm trying to accomplish:
{
"sipdump_v2-2018-04-30": {
"aliases": {},
"mappings": {
"Info": {
"properties": {
"from_server": {
"type": "ip"
}
}
}
}
}
}

/CJ

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