I've recently learned about date math and I'm interested in creating an ILM (Index Lifecycle Management) policy to generate a new index every day, with the index name associated with the date. For example, I would like the indices to be named like this: report-2023-11-01, report-2023-11-02, and so on.
Could someone assist me with this? Is it possible to create a template using date math for this purpose?
This is the traditional way of creating time-based indices, and this method typically relies on the process indexing data into Elasticsearch to determine the index name and direct the document there. Although you might be able to do this within an ingest template, there is no built in support within Elasticsearch for this.
You can still create an ILM policy that does not use rollover and link it to the time-based indices you create through an index template. The retention will in this case be based on the index creation date.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.