# While migrating index from ES2 to ES6 index size is gettting bigger

**URL:** https://discuss.elastic.co/t/while-migrating-index-from-es2-to-es6-index-size-is-gettting-bigger/129463
**Category:** Elasticsearch
**Created:** [April 25, 2018, 10:55am UTC](https://discuss.elastic.co/t/while-migrating-index-from-es2-to-es6-index-size-is-gettting-bigger/129463 "2018-04-25T10:55:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![manish\_mitra](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@manish\_mitra](https://discuss.elastic.co/u/manish_mitra)
#### Post date: [April 25, 2018, 10:55am UTC](https://discuss.elastic.co/t/while-migrating-index-from-es2-to-es6-index-size-is-gettting-bigger/129463/1 "2018-04-25T10:55:55Z")

</div>

```
indent preformatted text by 4 spaces
Hi,

```

We are upgrading Elastic stack from Elastic search 2.3.4 to elastic search 6.2.

When we are migrating index from ES2 to ES6, migrated index are taking more space in ES6 , we migrated thinking that ES6 would take less space. Need help if we are following right path.

Steps : We are taking snapshot from ES2. Then restoring it in ES5 and after reindex we are taking snapshot in ES5 and restoring them in ES6.

When we are reindexing in ES5 . Index of 16MB (in ES2)is taking 18 MB in ES5 . When we are restoring the reindexed index in ES6 it is taking 18 MB.

If any one can help why it is taking more space, or i am doing something wrong. When we are creating fresh index in ES6 they are taking less space.  
indent preformatted text by 4 spaces

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Mapping of index in ES2 Start \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*//

{"unicalog-mt-2018.04.20":{"mappings":{"logs":{"\_all":{"enabled":true,"omit\_norms":true},"dynamic\_templates":[{"string\_fields":{"mapping":{"fielddata":

{"format":"disabled"},"index":"analyzed","omit\_norms":true,"fields":{"raw":

{"index":"not\_analyzed","type":"string"}},"type":"string"},"match":"\*","match\_mapping\_type":"string"}}],"properties":{"@timestamp":

{"type":"date","format":"strict\_date\_optional\_time||epoch\_millis"},"@version":{"type":"string","index":"not\_analyzed"},"CORRELATION\_ID":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"comp\_level":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"dc\_name":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"file":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"geoip":{"dynamic":"true","properties":{"ip":

{"type":"ip"},"latitude":{"type":"float"},"location":{"type":"geo\_point"},"longitude":{"type":"float"}}},"host":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"hostname":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"log\_family":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"log\_type":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"msg":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"path":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"platform":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"processname":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"text":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}},"timedelta":{"type":"string","norms":

{"enabled":false},"fielddata":{"format":"disabled"},"fields":{"raw":{"type":"string","index":"not\_analyzed"}}}}},"default":{"\_all":

{"enabled":true,"omit\_norms":true},"dynamic\_templates":[{"string\_fields":{"mapping":{"fielddata":{"format":"disabled"},"index":"analyzed","omit\_norms":true,"fields":

{"raw":{"index":"not\_analyzed","type":"string"}},"type":"string"},"match":"\*","match\_mapping\_type":"string"}}],"properties":{"@timestamp":

{"type":"date","format":"strict\_date\_optional\_time||epoch\_millis"},"@version":{"type":"string","index":"not\_analyzed"},"geoip":{"dynamic":"true","properties":{"ip":

{"type":"ip"},"latitude":{"type":"float"},"location":{"type":"geo\_point"},"longitude":{"type":"float"}}}}}}}}

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Mapping of index in ES2 End \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*//

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Mapping of index in ES6 Start \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*//

{"unicalog1-mt-2018.04.20":{"mappings":{"doc":{"properties":{"@timestamp":{"type":"date"},"@version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"CORRELATION\_ID":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"comp\_level":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"dc\_name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"file":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"hostname":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"log\_family":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"log\_type":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"msg":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"path":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"platform":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"processname":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}},"timedelta":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}}}}}}}

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Mapping of index in ES6 End \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*//

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 25, 2018, 7:49pm UTC](https://discuss.elastic.co/t/while-migrating-index-from-es2-to-es6-index-size-is-gettting-bigger/129463/2 "2018-04-25T19:49:16Z")

</div>

I moved your question to #elasticsearch.

This is not the right way to format properly your code:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/0/508a66c2fe3e19974458d655599d112a5e4f9b70.jpg)

Could you please use the preview window before posting?

As an example, you wrote:

{"unicalog-mt-2018.04.20":{"mappings":{"logs":{"\_all":{"enabled":true,"omit\_norms":true},"dynamic\_templates":[{"string\_fields":{"mapping":{"fielddata":

{"format":"disabled"},"index":"analyzed","omit\_norms":true,"fields":{"raw":

It should be like:

```auto
{ 
  "unicalog-mt-2018.04.20" : {
    "mappings" : {
      "logs" : {
        "_all":{"enabled":true,"omit_norms":true},
        "dynamic_templates":[...]
...

```

To do that, just write:

````
```
{ 
  "unicalog-mt-2018.04.20" : {
    "mappings" : {
      "logs" : {
        "_all":{"enabled":true,"omit_norms":true},
        "dynamic_templates":[...]
...
```
````

---

<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: [May 23, 2018, 7:49pm UTC](https://discuss.elastic.co/t/while-migrating-index-from-es2-to-es6-index-size-is-gettting-bigger/129463/3 "2018-05-23T19:49:19Z")

</div>

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