Hello Elastic Team,
I have applied ILM policy(test) to my Index(timeseries) where I have defined ONLY hot phase with conditions max_age(15m) & max_docs(5).
My index is getting rollover but not following/matching above conditions strictly.
It always exceeds the max_age & max_docs with indices name as 00001,00002,00003...so on
Expected behavior: Any of the conditions(either max_age or max_docs) should match and once it matched it should rollover the index.
#==> ILM policy <============================
PUT _ilm/policy/test
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "15m",
"max_docs":5
},
"set_priority": {
"priority": 100
}
}
}
}
}
}
#==> Index Template <=========================
PUT _index_template/timeseries_template
{
"index_patterns": ["timeseries-*"],
"template":{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "test",
"index.lifecycle.rollover_alias": "timeseries"
}
}
}
#==> Write aliases<===========================
PUT timeseries-000001
{
"aliases": {
"timeseries": {
"is_write_index": true
}
}
}
#==> To check the ILM actions<=================
GET timeseries-*/_ilm/explain
#==> sending data into Index <=================
POST timeseries/_doc
{
"name":"mangesh",
"birthdate":"1993-06-01"
}
POST timeseries/_doc
{
"name":"pankaj",
"birthdate":"1994-10-01"
}
==============================================
Is there any default minimum value for the fields max_age & max_docs in elasticsearch? If not then please suggest on this.
Help me to correct if there is anything wrong with my queries.
Thank you!