Access metadata from input elasticsearch


I am using elasticsearch input plugin for copying index from one cluster to another. I would like to access document metadata like _type.
I want to modify the _type and store in target elasticsearch cluster with new name.
How can I do that?


What plugin are you using, can you provide a link?

If you just want to replace the type, do that in the output.
Otherwise you can use "%{[@metadata][_type]}".