How to get daily new index?

Hi,
for my Index I would like to get every day a new one name_date like my_index_190503. With Logstast it works out of the box. But how to realize it with a own index? Can I create a index out of my C# -code? Or is it possible via template? And how to do it?
Would be great to get some support.
Thanks.

Here my index:

PUT time_series
{
  "settings": {
    "number_of_shards": 5
  },
  "mappings": {
    "timeseries": {
      "properties": {
                "timestamp" : { 
                  "type" : "date",
                  "format": "MM/dd/yyyy HH:mm:ss"
                  },
                "value" : { "type" : "double" },
                "recordid" : { "type" : "integer" }
      }
    }
  }
}

Hey

see the date math support in index name

--Alex

Thanks Alex! :slight_smile:

Right now I just give the new index name including date to the client and the index is created automatically.
https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/indexing-documents.html#_single_documents_with_parameters
Now I have only the problem to set the right types for the values.

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