I am trying to create my own data stream with ILM and index .ds but it is not working
Follwing worked
PUT _ilm/policy/sachin
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_primary_shard_size": "25gb",
"max_age": "365d"
}
}
}
}
}
}
following worked
PUT _index_template/sachin
{
"index_patterns": ["sachin-*"],
"data_stream": {},
"priority": 500
}
This one failed with error
PUT _data_stream/sachin
Error -
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "no matching index template found for data stream [sachin]"
}
],
"type": "illegal_argument_exception",
"reason": "no matching index template found for data stream [sachin]"
},
"status": 400
}
what am I doing wrong?
And if I do following it creates regular index
POST /sachin/_doc/
{
"@timestamp": "2023-04-20T12:02:15.000Z"
}