# Upgrade from 1.7.x to 2.2.0 \_timestamp mapping issue

**URL:** <https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894>\
**Category:** Elasticsearch\
**Created:** [February 16, 2016, 2:27pm UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894 "2016-02-16T14:27:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisak/32/618_2.png) [@lisak](https://discuss.elastic.co/u/lisak)\
**Post date:** [February 16, 2016, 2:27pm UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894/1 "2016-02-16T14:27:45Z")

</div>

Hey,

I used the migration plugin and it said I can migrate without re-indexing, but I'm getting this error :

```
java.lang.IllegalStateException: unable to upgrade the mappings for the index [mi_2015_07_w4], reason: [Mapper for [_timestamp] conflicts with existing mapping in other types:
 [mapper [_timestamp] has different [store] values, mapper [_timestamp] has different [doc_values] values, cannot change from disabled to enabled]]
 at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkMappingsCompatibility(MetaDataIndexUpgradeService.java:339)
 at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.upgradeIndexMetaData(MetaDataIndexUpgradeService.java:116)
 at org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:228)
 at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:87)

```

I don't understand what it means exactly and whether I have to re-index everything (2B records). [This](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/breaking_20_mapping_changes.html#_literal __timestamp_literal_and_literal__ ttl_literal_deprecated) says that the \_timefield is just deprecated :

Could pls anybody help me with this?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [February 16, 2016, 8:26pm UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894/2 "2016-02-16T20:26:05Z")

</div>

It means you have `_timestamp` configured differently in two different types. In one type, you have timestamp stored, in the other it is not stored. Unfortunately this will require reindexing: the index contains a mix of segments with these conflicting settings.

I opened an issue to correctly mark this as requiring reindexing in the migration plugin:

> <https://github.com/elastic/elasticsearch-migration/issues/50>

---

<div class="post-metadata">

**Author:** ![lisak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lisak/32/618_2.png) [@lisak](https://discuss.elastic.co/u/lisak)\
**Post date:** [February 17, 2016, 12:15am UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894/3 "2016-02-17T00:15:15Z")

</div>

Hey, perfect, just one question. I have 74 indices and when I started 2.2.0 there were these errors logged, but just for a subset of the indices, like 15 of them. Do you think that I need to reindex just those? Can I rely on it?

Regarding the error, you are talking about "Document types" within index having `_timestamp` field configured differently, right? In my case :

```auto
 "manifest": {
    "_timestamp": {
       "enabled": true
    }
   "record": { 
    "_timestamp": {
       "enabled": true,
       "doc_values": true
    }
}

```

I guess that thte problem is the additional `doc_values` in the second mapping...

I was just thinking, how about if I delete one of the types?

[https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-delete-mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-delete-mapping.html)

That would fix the binary incompatibility, right?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [February 24, 2016, 6:42am UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894/4 "2016-02-24T06:42:12Z")

</div>

> when I started 2.2.0 there were these errors logged, but just for a subset of the indices, like 15 of them. Do you think that I need to reindex just those?

Yes, only the indexes that have errors (which should not have been loaded) would need to be reindexed.

> I was just thinking, how about if I delete one of the types?

Deleting types is no longer possible in 2.0+. While it _might_ work in this case, it depends on a lot of things (because all documents using that type need to be completely purged from the lucene segments), I would still recommend re-indexing.

---

<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:14pm UTC](https://discuss.elastic.co/t/upgrade-from-1-7-x-to-2-2-0--timestamp-mapping-issue/41894/5 "2017-07-05T23:14:00Z")

</div>


