Thanks for the quick reply! So, if I set a _ttl value in an index template and then use that template to create an index, the _ttl value would apply to the index itself. So, if the _ttl value in the template was 1 day, the index itself would be deleted after one day (assuming the indices.ttl.interval is appropriate)?
If so, in terms of the syntax, is the below correct:
curl -XPUT localhost:9200/_template/template_1 -d '
{
"template" : "*",
"order" : 0,
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"type1" : {
"_source" : { "enabled" : false }
"_ttl" : { "enabled" : true, "default" : "1d" }
}
}
}
Also, is there any documentation about setting _ttl in an index creation template?