Best way to create time-series index in Elasticsearch?

I have a news gather system(time base searching), which could fit time series index very well.
But I wonder what is the best way to create time-series index. Offcial doc only suggest to using it without how.

There are two ways I consider:

  1. Just insert data let elasticsearch auto create index

    • good: No orther script
    • bad: but how can I control the mapping?? Docs say mapping is create automaticlly, and it need reindex if I want to change mapping
  2. Use a crontab to auto create time series index with mapping

    • good: can create custom mapping
    • bad: need another script

As I see logstash and marvel both create time series index, how do they create index ?
It would be very nice If I can auto create index with custom mapping .

How are you planning to index the data? Using a custom application or Logstash for example?

The indexing system is responsible by design to create new indices when ever needed, e.g when using Logstash this is the default behaviour.

Just create the mapping you like as a template (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html), upload it to ES and then base all your new indices on this template.

I use a python script to index the data, template sulotion is exact what I looking for , thanks!