Logstash not preserving mappings when copying docs from one index to another

I am using the following pipeline to copy data from index to another.
input {
elasticsearch {
hosts => ["sourcehost:9200"]
index => "source-index"
query => '{"query":{"match_all":{}}}'
size => 500
scroll => "5m"
docinfo => true
output {
elasticsearch {
hosts => ["targethost:9200"]
index => "target-index"
manage_template => false
workers => 2

The issue with logstash is its not preserving the mapping of the source index.
For ex : an field is having following mappings in source index
"type": "date",
"store": true,
"format": "yyyy-MM-dd HH:mm:ss"
But in target index the mapping is
"type": "string"

LS has no concept of copy the mappings over.
You need to either pull the mapping down and define it in the output, or copy it over before (or use templates).

I tried creating the targetindex with mappings before starting logstash.
But logstash is throwing the below error:

Failed action. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"target-index", :_type=>"logs", :_routing=>nil}, #<LogStash::Event:0x509b7581 @metadata_accessors=#<LogStash::Util::Accessors:0x5c17038f @store={"_index"=>"source-index", "_type"=>"logs", "_id"=>"AVMYI34_m0t6GmsVN69I"}, @lut={}>, @cancelled=false, @data={"ACTION_EXPRESSION"=>nil, "ResponseTime_Number"=>0, "INSERT_DATE"=>"2016-01-11 01:34:47",

The docs are not copied to target index and its printing all docs on console like above