Index with same mapping has different size


I'm testing something and reindexing indices using the same mapping, but every time I reindex, the size of the newly created index always differs, shouldn't it be a constant number?

Depends, are you doing a force merge on the indices after indexing?
Do they have the same number of shards? Are you specifying a custom _id?

Nope, not doing a force merge after indexing
Yeah they have the same number of shards, everything's the same
hmm I'm not specifying a custom _id

Elasticsearch performs merges during indices, which can make used disk space vary quite a lot depending on where in the cycle you are. Whenever comparing storage, e.g. using different mappings like in this blog post, it is recommended to always run force merge down to a single segment in order to ensure a fair comparison.

thank you!!

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