# ドキュメントAPIにて、インデックス名に動的に日付を設定する方法

**URL:** https://discuss.elastic.co/t/api/293513
**Category:** 日本語による質問・議論はこちら
**Created:** [January 5, 2022, 9:58am UTC](https://discuss.elastic.co/t/api/293513 "2022-01-05T09:58:42Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)
#### Post date: [January 5, 2022, 11:19am UTC](https://discuss.elastic.co/t/api/293513/2 "2022-01-05T11:19:24Z")

</div>

類似の質問がありました。Date index name processorというものが使えそうです。

> [@Creating index on monthly basis](https://discuss.elastic.co/t/creating-index-on-monthly-basis/274762):
>
> Is there any way by which we can create index named \<prefix\>-yyyy.mm on the first day of every month and getting the alias pointed to this newly created index? I learned about date time but that changes the name only when the index rollover take places. I am using Rest High level java client to insert the Json messages into elastic search and kibana for visualization.

---

_[View the full topic](https://discuss.elastic.co/t/api/293513)._
