Using Elasticsearch 8.8
Im trying to use script pipeline to reindex documents, i will transform the old _type metadata into a new field '@type', but all scripts remove all _type and _score fields from the source of doc. There is a way to get the string for using to set the new field?
The main goal is a mega upgrade from elastic 2.4 to 8
Doc example:
{
"_index": "foo",
"_type": "bar",
"_source": {
}
}
Objective target:
{
"_index": "foo",
"_source": {
"@type": "bar"
}
}
Trying something like:
ctx['@type'] = ctx._type
Will return "null" because the _type is deleted before running anything. There is a workaround?