# Elasticsearch 7.x consumes more space for indexes

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406>\
**Category:** Elasticsearch\
**Created:** [January 31, 2020, 3:05pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406 "2020-01-31T15:05:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mainameiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainameiz/32/61855_2.png) [@mainameiz](https://discuss.elastic.co/u/mainameiz)\
**Post date:** [January 31, 2020, 3:05pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/1 "2020-01-31T15:05:12Z")

</div>

Hello everyone!

I have a question about index size of 7.5.2 version compared to 6.8.6.  
I have two identical set of data indexed in ES6 and in ES7. Both indexes are force merged.

**ES6 (index size - 91.2mb)**  
green open documents a1W\_4e7kSa6TotAwLtoyQQ 1 0 1128 0 91.2mb 91.2mb

**ES7 (index size - 209.9)**  
green open documents lafZmVFjShyvxCIIDcsrzg 1 0 1128 0 209.9mb 209.9mb

ES7 is about twice large.

There is a comparison between two indexes in suitable format - [https://gist.github.com/mainameiz/a94013e7375696f9f2e4f1feb5ff1b81/revisions](https://gist.github.com/mainameiz/a94013e7375696f9f2e4f1feb5ff1b81/revisions).

_Cloud please somebody explain me these differences?_ Is it caused by new algorithm ([https://www.elastic.co/blog/faster-retrieval-of-top-hits-in-elasticsearch-with-block-max-wand](https://www.elastic.co/blog/faster-retrieval-of-top-hits-in-elasticsearch-with-block-max-wand))?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 3, 2020, 3:40pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/2 "2020-02-03T15:40:44Z")

</div>

So, the mapping is the same (I have only briefly check the comparison, I did not find it intuitive to compare)? Have you executed a flush after indexing? Is any of those indices force merged?

This size seems to stem from a different configuration. What makes you think the new block max wand feature is causing this?

---

<div class="post-metadata">

**Author:** ![mainameiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainameiz/32/61855_2.png) [@mainameiz](https://discuss.elastic.co/u/mainameiz)\
**Post date:** [February 3, 2020, 4:50pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/3 "2020-02-03T16:50:40Z")

</div>

Thanks for reply, Alexander.

> So, the mapping is the same

Yes,I think mappings are the same (same custom analyzers/filters/number of shards/etc). Both indexes have no "\_all" field (it was disabled for ES6, and is not supported in ES7 at all). Both indexes are created using the same JSON payload (provided in gist)

> I have only briefly check the comparison, I did not find it intuitive to compare

The last (top) _diff_ [here](https://gist.github.com/mainameiz/a94013e7375696f9f2e4f1feb5ff1b81/revisions#diff-02fa33f6da5976c43bde06dd469c7d71) shows the fields on which they are different. Left (red) column is ES6 and right (green) is ES7.

I have used the command `POST /documents/_forcemerge?max_num_segments=1` to merge both indexes _before_ making a comparison.

> This size seems to stem from a different configuration.

I thought that only index settings can affect index size. But as I mentioned before index settings are the same. Do you know which other settings can impact index size?

_While writing this I thought that there can be some changes in default settings. I will investigate it and write the results._

> What makes you think the new block max wand feature is causing this?

As well as I understand the article this new feature adds some extra data in index files (which helps to speed up the searching).  
These lines from the article makes me think so:

> ... **introduces block-max indexes** and block-max WAND. The underlying idea of this paper is to split postings into fixed-size blocks and to **record** the maximum impact score separately for each block.  
> ... instead of **recording** impact scores in the index, **we record** pairs of term frequency and document length.

---

<div class="post-metadata">

**Author:** ![mainameiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainameiz/32/61855_2.png) [@mainameiz](https://discuss.elastic.co/u/mainameiz)\
**Post date:** [February 3, 2020, 5:51pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/4 "2020-02-03T17:51:59Z")

</div>

I just repeat the experiment and everything is ok. Both indexes have similar size 🙁. I'm pretty sure that I have merged both indexes and made them similar ☹

Sorry for wasting your time.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 4, 2020, 8:50am UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/5 "2020-02-04T08:50:53Z")

</div>

No worries, glad you got it working! If you ever figure out what was the issue, please append it here to share the knowledge.

---

<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:** [March 3, 2020, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-7-x-consumes-more-space-for-indexes/217406/6 "2020-03-03T08:51:03Z")

</div>

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