# Adding a field (via logstash) to a monthly index with a template

**URL:** <https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651>\
**Category:** Logstash\
**Created:** [June 3, 2020, 11:50pm UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651 "2020-06-03T23:50:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [June 3, 2020, 11:50pm UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651/1 "2020-06-03T23:50:41Z")

</div>

I understand that the template is applied at index creation, and I was wandering what will happen if I add a field via logstash in the middle of the month?

the added field will be usable for agregations and searches?

just will not have the mapping?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 4, 2020, 1:41pm UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651/2 "2020-06-04T13:41:41Z")

</div>

The template is applied to the mapping of the index at creation.

If the field is mentioned in the template then the mapping will be applied when the first document containing the field is indexed.

---

<div class="post-metadata">

**Author:** ![Incauto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/incauto/32/60149_2.png) [@Incauto](https://discuss.elastic.co/u/Incauto)\
**Post date:** [June 5, 2020, 6:36am UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651/3 "2020-06-05T06:36:53Z")

</div>

sorry Badger inglish is not my native language and some things I dont understand.

the answer to this question is no?

> [@Incauto](#):
>
> the added field will be usable for agregations and searches?

---

<div class="post-metadata">

**Author:** ![tamilsweet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamilsweet/32/54127_2.png) [@tamilsweet](https://discuss.elastic.co/u/tamilsweet)\
**Post date:** [June 5, 2020, 6:51am UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651/4 "2020-06-05T06:51:03Z")

</div>

Answer is Yes.  
Added fields will be usable for aggregations and searches. yes.

---

<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 3, 2020, 6:51am UTC](https://discuss.elastic.co/t/adding-a-field-via-logstash-to-a-monthly-index-with-a-template/235651/5 "2020-07-03T06:51:05Z")

</div>

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