# Upgraded from 6.4 to 7.4.2

**URL:** https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884
**Category:** Elasticsearch
**Created:** [December 14, 2019, 10:18pm UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884 "2019-12-14T22:18:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![praveenmak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveenmak/32/22708_2.png) [@praveenmak](https://discuss.elastic.co/u/praveenmak)
#### Post date: [December 14, 2019, 10:18pm UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/1 "2019-12-14T22:18:41Z")

</div>

Hello Folks,

We have upgraded ES from 6.4 to 7.4.2. I have a problem rolling over the index.  
I followed the instructions from this page

https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html

When I do a rollover as follows,

POST /myindex/\_rollover?dry\_run=false&wait\_for\_active\_shards=0  
{  
"conditions" : {  
"max\_age": "1d",  
"max\_size": "100gb"  
}  
}

I get this error,

{  
"error": {  
"root\_cause": [  
{  
"type": "remote\_transport\_exception",  
"reason": "[hostname][IP:9300][indices:admin/rollover]"  
}  
],  
"type": "illegal\_argument\_exception",  
"reason": "The [default] mapping cannot be updated on index [myindex-2019.12.14-000208]: defaults mappings are not useful anymore now that indices can have at most one type."  
},  
"status": 400  
}

Can someone help?

---

<div class="post-metadata">

### Author: ![VietCong](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@VietCong](https://discuss.elastic.co/u/VietCong)
#### Post date: [December 16, 2019, 4:35am UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/2 "2019-12-16T04:35:28Z")

</div>

It complains about your old mapping. If you read the breaking changes documentation, in Elasticsearch 7.x it will only allow document type \_doc. I assume your old mapping has document type as something else which will need to be removed from the mapping as 7.x mapping does not allow you to define custom document type anymore.

---

<div class="post-metadata">

### Author: ![praveenmak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveenmak/32/22708_2.png) [@praveenmak](https://discuss.elastic.co/u/praveenmak)
#### Post date: [December 16, 2019, 6:46pm UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/3 "2019-12-16T18:46:21Z")

</div>

Like I said, I did follow the removal-of-types. So the template that I have now looks like following,

{  
"myindex-template" : {  
"order" : 0,  
"index\_patterns" : [  
"myindex-_"  
],  
"settings" : {  
"index" : {  
"number\_of\_shards" : "2",  
"number\_of\_replicas" : "1",  
"refresh\_interval" : "60s"  
}  
},  
"mappings" : {  
"\_doc" : {  
"dynamic\_templates" : [  
{  
"message\_field" : {  
"path\_match" : "message",  
"mapping" : {  
"norms" : false,  
"type" : "text"  
},  
"match\_mapping\_type" : "string"  
}  
},  
{  
"string\_fields" : {  
"mapping" : {  
"norms" : false,  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
},  
"type" : "text"  
},  
"match\_mapping\_type" : "string",  
"match" : "_"  
}  
}  
],  
"properties" : {  
"@timestamp" : {  
"type" : "date"  
},  
"geoip" : {  
"dynamic" : "true",  
"properties" : {  
"city\_name" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
},  
"CustomerIP" : {  
"type" : "ip"  
},  
"ip" : {  
"type" : "ip"  
},  
"latitude" : {  
"type" : "half\_float"  
},  
"country\_code2" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
},  
"country\_name" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
},  
"continent\_code" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
},  
"location" : {  
"type" : "geo\_point"  
},  
"region\_name" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
},  
"longitude" : {  
"type" : "half\_float"  
},  
"region\_code" : {  
"norms" : false,  
"type" : "text",  
"fields" : {  
"keyword" : {  
"ignore\_above" : 256,  
"type" : "keyword"  
}  
}  
}  
}  
},  
"@version" : {  
"type" : "keyword"  
}  
}  
}  
},  
"aliases" : { }  
}  
}

When I try to rollover or add new index. I get the same error.  
"defaults mappings are not useful anymore now that indices can have at most one type"

Please help, as you see the \_doc is used in the template.

---

<div class="post-metadata">

### Author: ![VietCong](https://avatars.discourse-cdn.com/v4/letter/v/e47774/32.png) [@VietCong](https://discuss.elastic.co/u/VietCong)
#### Post date: [December 17, 2019, 3:18am UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/4 "2019-12-17T03:18:38Z")

</div>

> [@praveenmak](#):
>
> The [default] mapping cannot be updated on index

Is there any other template that might be applying to this one index?

---

<div class="post-metadata">

### Author: ![praveenmak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveenmak/32/22708_2.png) [@praveenmak](https://discuss.elastic.co/u/praveenmak)
#### Post date: [December 18, 2019, 4:02pm UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/5 "2019-12-18T16:02:33Z")

</div>

There is only one template and I deleted the template and created fresh as per 7.4 version.

---

<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: [January 15, 2020, 4:02pm UTC](https://discuss.elastic.co/t/upgraded-from-6-4-to-7-4-2/211884/6 "2020-01-15T16:02:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
