Index policy evaluation

Hi all. A very quick one. I have the following policy
{
“policy”: {
“policy_id”: “Delete_older_than_60d”,
“description”: “Changes replica count and deletes”,
“last_updated_time”: 1608542726528,
“schema_version”: 1,
“error_notification”: null,
“default_state”: “current”,
“states”: [
{
“name”: “current”,
“actions”: ,
“transitions”: [
{
“state_name”: “old”,
“conditions”: {
“min_index_age”: “30d”
}
}
]
},
{
“name”: “old”,
“actions”: [
{
“replica_count”: {
“number_of_replicas”: 0
}
}
],
“transitions”: [
{
“state_name”: “delete”,
“conditions”: {
“min_index_age”: “40d”
}
}
]
},
{
“name”: “delete”,
“actions”: [
{
“delete”: {}
}
],
“transitions”:
}
]
}
}

So what I want is remove replica and put to 0 older than 30 days then after 40 days more delete the index.

Is that right? SO the lifespan of the index is 70 days?

Cheers

anyone on this?

Cheers

Hey @alfredo.deluca,

Sorry for the late response, but no that would not keep the index for 70 days. Since you used the index_age your example would be to keep it in current for 30 days then move it to old and set replicas to 0. It’ll stay in old for 10 days (index age is now 40 days) before moving to delete where it deletes the index. You can change the “40d” to “70d” to behave how you want.