# \[@timestamp\] is used by multiple types. Set update\_all\_types to true to update \[format\] across all types

**URL:** <https://discuss.elastic.co/t/timestamp-is-used-by-multiple-types-set-update-all-types-to-true-to-update-format-across-all-types/46465>\
**Category:** Elasticsearch\
**Created:** [April 6, 2016, 3:06am UTC](https://discuss.elastic.co/t/timestamp-is-used-by-multiple-types-set-update-all-types-to-true-to-update-format-across-all-types/46465 "2016-04-06T03:06:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)\
**Post date:** [April 6, 2016, 3:06am UTC](https://discuss.elastic.co/t/timestamp-is-used-by-multiple-types-set-update-all-types-to-true-to-update-format-across-all-types/46465/1 "2016-04-06T03:06:16Z")

</div>

I have a template as below:

```
curl -XPUT localhost:9200/_template/template_flow_detail -d '
{
    "template" : "flow_detail_*",
    "mappings" : {
            "traffic" : {
                "properties" : {
                    "@timestamp": { "index": "not_analyzed", "type": "date","format": "epoch_second"},
                    "router_ip" : { "type" : "integer", "index" : "not_analyzed"},
                    "interface" : { "type" : "integer", "index" : "not_analyzed"},
                    "src_ip" : { "type" : "ip", "index" : "not_analyzed"},
                    "dst_p" : { "type" : "ip", "index" : "not_analyzed"},
                    "src_port" : { "type" : "integer", "index" : "not_analyzed"},
                    "dst_port" : { "type" : "integer", "index" : "not_analyzed"},
                    "protocol" : { "type" : "string", "index" : "not_analyzed" },
                    "bits" : { "type" : "long", "index" : "not_analyzed" },
                    "pkts" : { "type" : "long", "index" : "not_analyzed" }
                }
            }
        },
    "settings": {
        "number_of_shards": 1,
        "number_of_replicas": 0
    }
}'

```

There is only one type in the template and only one field called @timestamp. When I bulk index data into this index it show error like below:

```
[2016-04-06 10:06:11,090][DEBUG][action.bulk] [ES01] [flow_detail_1459382400][0] failed to execute bulk item (index) index {[flow_detail_1459382400][netflow][172987603026241459440300], source[{"flow_direction": 1, "src_port": 12772, "@timestamp": 1459440300, "src_ip": 712529336, "pkts": 5, "router_ip": 172987603, "dst_port": 18365, "dst_ip": 712529524, "interface": 3, "protocol": "sctp", "bits": 12392}]}
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.]
	at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:170)
	at org.elasticsearch.index.mapper.MapperService.checkMappersCompatibility(MapperService.java:402)
	at org.elasticsearch.index.mapper.MapperService.checkMappersCompatibility(MapperService.java:411)
	at org.elasticsearch.index.mapper.DocumentMapper.merge(DocumentMapper.java:390)
	at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:261)
	at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230)
	at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:458)
	at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:762)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

```

Can Anyone tell me why this error is happenning since I only have one type?  
Also where to set the update\_all\_type ?

---

<div class="post-metadata">

**Author:** ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)\
**Post date:** [April 6, 2016, 3:30am UTC](https://discuss.elastic.co/t/timestamp-is-used-by-multiple-types-set-update-all-types-to-true-to-update-format-across-all-types/46465/2 "2016-04-06T03:30:28Z")

</div>

while... this is a mistake..........

I defined the map in my template. But while indexing the type in the URL is not correctly spelled. So es will understand that you have two maps. One is pre denfined by you. Other one is generated dynamically

---

<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:02pm UTC](https://discuss.elastic.co/t/timestamp-is-used-by-multiple-types-set-update-all-types-to-true-to-update-format-across-all-types/46465/3 "2017-07-05T23:02:04Z")

</div>


