# Script that will return/estimate the size a document (including indexes)?

**URL:** <https://discuss.elastic.co/t/script-that-will-return-estimate-the-size-a-document-including-indexes/61959>\
**Category:** Elasticsearch\
**Created:** [September 30, 2016, 8:36pm UTC](https://discuss.elastic.co/t/script-that-will-return-estimate-the-size-a-document-including-indexes/61959 "2016-09-30T20:36:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddorian43](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddorian43/32/36093_2.png) [@ddorian43](https://discuss.elastic.co/u/ddorian43)\
**Post date:** [September 30, 2016, 8:36pm UTC](https://discuss.elastic.co/t/script-that-will-return-estimate-the-size-a-document-including-indexes/61959/1 "2016-09-30T20:36:44Z")

</div>

I know about \_size, but that keeps only the size of the original \_source. Any way to also know the size of the index for each document ? Probably not, is there a way to estimate (assuming we have the \_source) ?

Thank You

---

<div class="post-metadata">

**Author:** ![ddorian43](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ddorian43/32/36093_2.png) [@ddorian43](https://discuss.elastic.co/u/ddorian43)\
**Post date:** [October 8, 2016, 9:26am UTC](https://discuss.elastic.co/t/script-that-will-return-estimate-the-size-a-document-including-indexes/61959/2 "2016-10-08T09:26:06Z")

</div>

8 day bump

---

<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 5, 2017, 10:13pm UTC](https://discuss.elastic.co/t/script-that-will-return-estimate-the-size-a-document-including-indexes/61959/3 "2017-07-05T22:13:53Z")

</div>


