# Adding new index based on field

**URL:** <https://discuss.elastic.co/t/adding-new-index-based-on-field/138236>\
**Category:** Elasticsearch\
**Created:** [July 2, 2018, 3:05pm UTC](https://discuss.elastic.co/t/adding-new-index-based-on-field/138236 "2018-07-02T15:05:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ELK\_developer99](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@ELK\_developer99](https://discuss.elastic.co/u/ELK_developer99)\
**Post date:** [July 2, 2018, 3:05pm UTC](https://discuss.elastic.co/t/adding-new-index-based-on-field/138236/1 "2018-07-02T15:05:57Z")

</div>

I'm trying to parse my JSON data in the logstash config and send the JSON to elasticSearch depending on the week. My data fields has the specific date.

Example: I have a date:"MM-DD-YYYY" as a field in the JSON, but I want to send to an index based on the week, so index should be something like "Week of 06/20".

---

<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 30, 2018, 3:05pm UTC](https://discuss.elastic.co/t/adding-new-index-based-on-field/138236/2 "2018-07-30T15:05:58Z")

</div>

Closed on July 30, 2018, 3:05pm UTC

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