# How to add \_size mapping to index legacy template in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-add-size-mapping-to-index-legacy-template-in-elasticsearch/335672>\
**Category:** Elasticsearch\
**Created:** [June 10, 2023, 5:06am UTC](https://discuss.elastic.co/t/how-to-add-size-mapping-to-index-legacy-template-in-elasticsearch/335672 "2023-06-10T05:06:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [June 10, 2023, 5:16am UTC](https://discuss.elastic.co/t/how-to-add-size-mapping-to-index-legacy-template-in-elasticsearch/335672/2 "2023-06-10T05:16:38Z")

</div>

Hi @Amirhossein_eidy

Duplicate Question. This question has already been answered.

> [@How to add \_size mapping to index template in elasticsearch?](https://discuss.elastic.co/t/how-to-add-size-mapping-to-index-template-in-elasticsearch/335432):
>
> Hi friends I have installed size mapping plugin and I added it to Kibana meta fields too I could successfully enable "\_size" in Elasticsearch via bellow command and see the result in kibana PUT logstash-2023-06-06 { "mappings": { "\_size": { "enabled": true } } } but I could just enable size field in a single upcoming index, how to enable \_size mapping in all of my upcoming indices and index template? should I add it in Kibana index template or elasticsearch?

---

_[View the full topic](https://discuss.elastic.co/t/how-to-add-size-mapping-to-index-legacy-template-in-elasticsearch/335672)._
