I'm attempting to follow this tutorial
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/getting-started-index-lifecycle-management.html
And I am at the point where it says to Create an index template
PUT _index_template/timeseries_template
{
"index_patterns": ["timeseries"],
"data_stream": { },
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "timeseries_policy"
}
}
}
But I get this error
{
"error" : {
"root_cause" : [
{
"type" : "x_content_parse_exception",
"reason" : "[3:3] [index_template] unknown field [data_stream]"
}
],
"type" : "x_content_parse_exception",
"reason" : "[3:3] [index_template] unknown field [data_stream]"
},
"status" : 400
}