Access metadata from input elasticsearch

Hi,

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?

Regards,
Vilas

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

https://www.elastic.co/guide/en/logstash/1.5/plugins-inputs-elasticsearch.html

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