# After reindex, new index has same documents but data size is much less

**URL:** <https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768>\
**Category:** Elasticsearch\
**Created:** [June 23, 2021, 9:59am UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768 "2021-06-23T09:59:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosita\_Andrade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rosita_andrade/32/77664_2.png) [@Rosita\_Andrade](https://discuss.elastic.co/u/Rosita_Andrade)\
**Post date:** [June 23, 2021, 9:59am UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768/1 "2021-06-23T09:59:40Z")

</div>

Hi,

This seems to be a similar case as [After reindex, new index has same documents but data size is much less](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/243068).

I used the Reindex API and my new index is significantly smaller in size. I have a feeling, that it might be because of the mapping and deletion requests.

The source ES index is version 5.6.11. The destination index is 7.11.2

The only changes I have done in the mapping are the following:

1. Changed the mapping of one of the fields from

```auto
"mapping": {
                "analyzer": "autocomplete",
                "type": "keyword"
              }

```

to

```auto
"mapping": {
                "analyzer": "autocomplete",
                "type": "text"
              }

```

because the new version would complain about deprecation.

 ![Screenshot 2021-06-23 at 11.45.19](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04ae77457dcdd7255b9a40f46542ee7484c2c43d.png)

1. In the index settings I had

```auto
     "analyzer": {
            "reverse": {
              "filter": [
                "reverse"
              ],
              "type": "custom",
              "tokenizer": "standard"
            },
            "autocomplete": {
              "filter": [
                "standard",
                "lowercase",
                "stop",
                "kstem",
                "edge_ngram"
              ],
              "type": "custom",
              "tokenizer": "standard"
            },

```

I removed the "standard" filter cause the new version does not allow me to create mapping with this one.

 ![Screenshot 2021-06-23 at 12.01.58](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1acb8eb8559733185857399518a18a623291f830.png)

My question is can this small change in mapping, can have significant difference in the size of the index despite the same number of documents being indexed?

Thanks!

---

<div class="post-metadata">

**Author:** ![Rosita\_Andrade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rosita_andrade/32/77664_2.png) [@Rosita\_Andrade](https://discuss.elastic.co/u/Rosita_Andrade)\
**Post date:** [June 23, 2021, 10:15am UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768/2 "2021-06-23T10:15:03Z")

</div>

Ok, following up with a finding. Even if I use the deprecated version for the analyser on keyword, the index size is still significantly lower.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 23, 2021, 10:23am UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768/3 "2021-06-23T10:23:56Z")

</div>

Welcome to our community! 😃

> [@Rosita\_Andrade](#):
>
> My question is can this small change in mapping, can have significant difference in the size of the index despite the same number of documents being indexed?

It's possible, you are coming from a pretty old version to one that has had substantial work done on things like this.

---

<div class="post-metadata">

**Author:** ![Rosita\_Andrade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rosita_andrade/32/77664_2.png) [@Rosita\_Andrade](https://discuss.elastic.co/u/Rosita_Andrade)\
**Post date:** [June 23, 2021, 12:06pm UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768/4 "2021-06-23T12:06:41Z")

</div>

Alright, Thank you very much for your response!

---

<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 21, 2021, 12:06pm UTC](https://discuss.elastic.co/t/after-reindex-new-index-has-same-documents-but-data-size-is-much-less/276768/5 "2021-07-21T12:06:51Z")

</div>

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