Please format your code using </>
icon as explained in this guide. It will make your post more readable.
Or use markdown style like:
```
CODE
```
What I can see here is that all the kimchy value in user field is going to be updated but to what?
No. You are just selected here all documents which are matching kimchy
on the name
field. You are here just reindexing them without changing anything in the _source
.
This is used when you change the mapping and wants to add a sub field in the mapping. You have for that to reevaluate all the documents.
But you can add a script to transform the document:
"script": {
"source": "ctx._source.foo=1",
"lang": "painless"
},
Or define an ingest processor which will do the transformation:
PUT _ingest/pipeline/set-foo
{
"description" : "sets foo",
"processors" : [ {
"set" : {
"field": "foo",
"value": "bar"
}
} ]
}
POST twitter/_update_by_query?pipeline=set-foo