# @timestamp conflicts with existing mapping in eleasticsearch 2

**URL:** <https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385>\
**Category:** Elasticsearch\
**Created:** [January 5, 2016, 9:32am UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385 "2016-01-05T09:32:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peppetrick](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@peppetrick](https://discuss.elastic.co/u/peppetrick)\
**Post date:** [January 5, 2016, 9:32am UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/1 "2016-01-05T09:32:56Z")

</div>

Hi all

I have an ELK test environment with two different log type.

I migrated from elasticsearch 1.7 to 2.x without problem, but trying to add a third log type I had the following error in elasticsearch log

\*\* at java.lang.Thread.run(Thread.java:745)\*\*  
**[2015-12-22 14:34:30,413][DEBUG][action.admin.indices.mapping.put] [Sise-Neg] failed to put mappings on indices [[logstash-dco-2015.12.21]], type [dco\_com]**  
**java.lang.IllegalArgumentException: Mapper for [@timestamp] conflicts with existing mapping in other types:**  
**[mapper [@timestamp] is used by multiple types. Set update\_all\_types to true to update [format] across all types.]**

The config can for the log added is the following `http://pastebin.com/raw/v1PuUr05`

I expect the field **DCO\_TIMESTAMP** is automatically converted in the DATE plugin.

Something in the config is wrong?

Thanks in advance

Giuseppe

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 5, 2016, 11:23pm UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/2 "2016-01-05T23:23:10Z")

</div>

What's the mapping on the existing field look like?

---

<div class="post-metadata">

**Author:** ![inderjeet26](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inderjeet26/32/3870_2.png) [@inderjeet26](https://discuss.elastic.co/u/inderjeet26)\
**Post date:** [January 6, 2016, 6:25pm UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/3 "2016-01-06T18:25:23Z")

</div>

I am having this same issue in production.

We have already have data in the indexes when we upgraded from Elasticsearch 1.6 to 2.1.0. Now when trying to add the new types in the already existing indexes, there is the conflict stated above

The _default_ mapping before upgrade is:

```
"_default_": {
    "dynamic_templates": [
      {
        "string_fields": {
          "mapping": {
            "index": "analyzed",
            "omit_norms": true,
            "type": "string",
            "fields": {
              "raw": {
                "ignore_above": 256,
                "index": "not_analyzed",
                "type": "string"
              }
            }
          },
          "match_mapping_type": "string",
          "match": "*"
        }
      }
    ],
    "_timestamp": {

    },
    "_all": {
      "enabled": true
    },
    "properties": {
      "geoip": {
        "dynamic": "true",
        "properties": {
          "location": {
            "type": "geo_point"
          }
        }
      },
      "@version": {
        "index": "not_analyzed",
        "type": "string"
      }
    }
  },

```

After the upgrade to new Elasticsearch, the defualt mapping for newly formed indexed have changed to : [http://pastebin.com/yFBdWqAz](http://pastebin.com/yFBdWqAz)

which works fine for newly created types in the same index with the new default mapping. I am transforming the timestamp with the date filter aswell.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 6, 2016, 7:49pm UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/4 "2016-01-06T19:49:54Z")

</div>

Did you read 2.X [breaking changes](https://www.elastic.co/guide/en/elasticsearch/reference/2.1/breaking_20_mapping_changes.html)? Also it'd be better if you started your own thread 🙂

---

<div class="post-metadata">

**Author:** ![peppetrick](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@peppetrick](https://discuss.elastic.co/u/peppetrick)\
**Post date:** [January 7, 2016, 9:12am UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/5 "2016-01-07T09:12:32Z")

</div>

For index cretaed before migration I see

"@timestamp": {  
"type": "date",  
"format": "epoch\_millis||dateOptionalTime"  
},

[complete mapping here](http://pastebin.com/raw/n0Aky0ve)  
For index created after migration I see

"@timestamp": {  
"type": "date",  
"format": "strict\_date\_optional\_time||epoch\_millis"  
}

[complete mapping here](http://pastebin.com/raw/n0Aky0ve)

---

<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, 11:26pm UTC](https://discuss.elastic.co/t/timestamp-conflicts-with-existing-mapping-in-eleasticsearch-2/38385/6 "2017-07-05T23:26:29Z")

</div>


