Hi, I'm trying to change a field type to another type, I've seem that I cannot do that directly in my current Index, so I'm trying to use the REINDEX API.
I've tried something like this, I know it's wrong, but it's just to show my idea.
POST _reindex
{
"source": {
"index": "auto_de_infracao"
},
"dest": {
"index": "auto_de_infracao2"
},
"script": {
"lang": "painless",
"inline": "ctx._source.valAutoInfracao = ctx._source.valAutoInfracaoX",
"type":"number"
}
}
Objective change valAutoInfracao type to number