Reindexing to duplicate a field into new raw field

Hi,
I have an index with analyzed parameter, what I want to do is duplicate this parameter into new not analyzed raw field of this param.
I have created the new mappings with the new raw field of that parameter.
When I reindex with
"script": "ctx.volname.raw.value = ctx._source.volname"

I get "Cannot get property 'raw' on null object"

What is the correct way to do this and where can I learn more about how to use fields and debug scripting. Language is groovy and elastic version is 2.4.

Thanks

Hey,

you need to use multi fields in the mapping and add the new field in there, and then you can trigger a regular reindex operation, without any scripting.

--Alex

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.