# Mapper conflicts with existing mapping in other types

**URL:** <https://discuss.elastic.co/t/mapper-conflicts-with-existing-mapping-in-other-types/53635>\
**Category:** Elasticsearch\
**Created:** [June 22, 2016, 9:29am UTC](https://discuss.elastic.co/t/mapper-conflicts-with-existing-mapping-in-other-types/53635 "2016-06-22T09:29:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joel\_Shadbolt](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Joel\_Shadbolt](https://discuss.elastic.co/u/Joel_Shadbolt)\
**Post date:** [June 22, 2016, 9:29am UTC](https://discuss.elastic.co/t/mapper-conflicts-with-existing-mapping-in-other-types/53635/1 "2016-06-22T09:29:42Z")

</div>

Hi,

I am attempting to index two separate copies of the same log file (different environments) into two separate indexes (one for each environment) and I have in place a mapping template for which through wildcarding matches both but am receving the following issue on attempting to index the data:

`illegal_argument_exception", "reason"=>"Mapper for [time] conflicts with existing mapping in other types: [mapper [time] is used by multiple types. Set update_all_types to true to update [format] across all types.]`

Here is the Logstash configuration:

`input { file { type => "prod" path => ["//[hostname]/TomcatLogs/ssearch-access.log"] start_position => beginning ignore_older => 0 } file { type => "preprod" path => ["//[hostname]/TomcatLogs/ssearch-access.log"] start_position => beginning ignore_older => 0 } } filter { csv { columns => ["time", "username", "searchId", "searchType", "searchString", "status", "took", "hitCount"] separator => "," } } output { if [type] == "prod" { elasticsearch { index => "ssearch-accesslog-prod-%{+YYYY.MM.dd}" } } if [type] == "preprod" { elasticsearch { index => "ssearch-accesslog-preprod-%{+YYYY.MM.dd}" } } }`

And finally the key snippet from the mapping template in place on elasticsearch:  
`{ "template": "ssearch-accesslog-*", "settings": { "number_of_shards": 1, "number_of_replicas": 0, "index.refresh_interval": "5s" }, "mappings": { "logs": { "properties": { "time": { "type": "date", "format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ" }, ...`

When indexing without a mapping I have no issues. Can someone highlight to me the cause of the issue here?

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:41pm UTC](https://discuss.elastic.co/t/mapper-conflicts-with-existing-mapping-in-other-types/53635/2 "2017-07-05T22:41:26Z")

</div>


