Hi everyone!
I need to change the mapping of a current field because is currentry a text field and i need to be a keyword.
The field path is event.userDefined.headerId
The currentry mapping has some dynamic templates:
"userdefined-string": {
"path_match": "event.userDefined.*",
"match_mapping_type": "string",
"mapping": {
"type": "text"
}
}
},
{
"userdefined-long": {
"path_match": "event.userDefined.*",
"match_mapping_type": "long",
"mapping": {
"type": "integer"
}
}
}
and i need to change the field header id inside event.userDefined to keyword
"userDefined": {
"parameters": {
"properties": {
"error_code": {
"type": "text"
},
"error_description": {
"type": "text"
},
"headerId": {
"type": "text"
}
}
},
"query": {
"type": "text"
}
}
}
I created the following runtime field to do that but is not currently working
"runtime": {
"event.userDefined.headerId": {
"type": "keyword",
"script": {
"source": "emit(doc['event.userDefined.headerId'].value)",
"lang": "painless"
}
}
},e
Please help
Thanks in advance