I've written the following script and am running it using dev tools
The first time I ran it, the field "result" said "created". As you can see from the screenshot, I've run this code a couple of times. Reason being, When I go back onto the 'discover' tab in kibana, there is no new field created called 'full_name'. I dont understand what's going on here, where is this field now and how do I get it to display? I would like to use it to later in Kibana...
If my approach is wrong, whats another way to create a new field and copy over the value of an existing field into that new field?
I have triped the 'copy_to' approach like so:
PUT somelistcopy/_mapping/doc
{
"properties": {
"parsed.FIRST_NAME": {
"type": "text",
"copy_to": "full_name"
},
"full_name": {
"type": "text"
}
}
}
But it doesn't actually create a new field in the mapping which you can use later in Kibana to visualise anything...