# Index policy evaluation

**URL:** <https://forum.opensearch.org/t/index-policy-evaluation/4462>\
**Category:** Index Management\
**Created:** [December 22, 2020, 1:42pm UTC](https://forum.opensearch.org/t/index-policy-evaluation/4462 "2020-12-22T13:42:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfredo.deluca](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@alfredo.deluca](https://forum.opensearch.org/u/alfredo.deluca)\
**Post date:** [December 22, 2020, 1:42pm UTC](https://forum.opensearch.org/t/index-policy-evaluation/4462/1 "2020-12-22T13:42:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alfredo.deluca](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@alfredo.deluca](https://forum.opensearch.org/u/alfredo.deluca)\
**Post date:** [December 23, 2020, 4:11pm UTC](https://forum.opensearch.org/t/index-policy-evaluation/4462/2 "2020-12-23T16:11:04Z")

</div>

anyone on this?

Cheers

---

<div class="post-metadata">

**Author:** ![dbbaughe](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dbbaughe](https://forum.opensearch.org/u/dbbaughe)\
**Post date:** [January 27, 2021, 8:30am UTC](https://forum.opensearch.org/t/index-policy-evaluation/4462/3 "2021-01-27T08:30:16Z")

</div>

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.
