# Elastic Search Upgrade from 5.X to 7.X

**URL:** <https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023>\
**Category:** Elasticsearch\
**Created:** [September 25, 2019, 12:10pm UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023 "2019-09-25T12:10:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![het](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@het](https://discuss.elastic.co/u/het)\
**Post date:** [September 25, 2019, 12:10pm UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/1 "2019-09-25T12:10:03Z")

</div>

Hello,

I was upgrading elasticsearch 5.X version to 7.3. I read ES removed mapping type. Right now, I have a mapping type in my structure. Under one index, I have around 10 different mapping type and each mapping type has different mapping.

Ex :  
IndexName -- MappingType -- Mapping  
ABC -- Car -- { "created\_on": {"type":"date"}}  
ABC -- MoterCyle -- { "created\_on": {"type":"date"}}  
That is just an example

Now if I want to upgrade to 7.3(current) How many changes I need to do?

I read the articles of elasticsearch removing of mapping type. but could not get much. Can someone help me?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [September 26, 2019, 12:03pm UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/2 "2019-09-26T12:03:24Z")

</div>

The generic advice would be to create one separate index per type. So, create one index for `Car` and another one for `MoterCyle`.

---

<div class="post-metadata">

**Author:** ![het](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@het](https://discuss.elastic.co/u/het)\
**Post date:** [September 28, 2019, 4:33am UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/3 "2019-09-28T04:33:47Z")

</div>

Thanks abdon.

Will Index name per type will cause any issue in future? Right now, For one customer, I have one index and under that index there are 10 mapping type. So If I create 10 different index for one customer, will it be going to impact any performance issue?

I have more than 200 customers. the number of indexes will be 10X from right now when I will go to 7.X. In that case I might need to add additional nodes also.

Also, I need to use multi index for search in that case right?

Was there any alternative?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 28, 2019, 6:29am UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/4 "2019-09-28T06:29:35Z")

</div>

Having a lot of small indices and shards will be very inefficient and likely cause problems. If I recall correctly Elasticsearch 5.x prevents you from having different mappings for different types within an index, so the easiest solution is probably to add a field to each document which contains the type of the document. You can filter on this when you query to limit searches to specific type(s).

---

<div class="post-metadata">

**Author:** ![het](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@het](https://discuss.elastic.co/u/het)\
**Post date:** [September 28, 2019, 6:24pm UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/5 "2019-09-28T18:24:47Z")

</div>

Thanks, @Christian_Dahlqvist. Probably I will add index type in each document's field and while searching the document, I will add the filter to get the document. It will help me for upgrading the ES 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:** [October 26, 2019, 6:24pm UTC](https://discuss.elastic.co/t/elastic-search-upgrade-from-5-x-to-7-x/201023/6 "2019-10-26T18:24:49Z")

</div>

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