# Policies

**URL:** <https://discuss.elastic.co/t/policies/166906>\
**Category:** Elasticsearch\
**Created:** [February 4, 2019, 6:54am UTC](https://discuss.elastic.co/t/policies/166906 "2019-02-04T06:54:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhilsai1499](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhilsai1499/32/71890_2.png) [@akhilsai1499](https://discuss.elastic.co/u/akhilsai1499)\
**Post date:** [February 4, 2019, 6:54am UTC](https://discuss.elastic.co/t/policies/166906/1 "2019-02-04T06:54:56Z")

</div>

Hi Elasticsearch team

If i am implementing the policy in latest released version of elasticsearch 6.6  
still i cant implement my policy

Please see my code

PUT \_template/my  
{  
"index\_patterns": ["abc-\*"],  
"settings": {  
"number\_of\_shards": 1,  
"number\_of\_replicas": 1,  
"index.lifecycle.name": "policy1",  
"index.lifecycle.rollover\_alias": "alias1"  
}  
}

PUT \_ilm/policy/policy1  
{  
"policy": {  
"phases": {  
"hot": {  
"actions": {  
"rollover" : {  
"max\_docs": 2  
}  
}  
}  
}  
}  
}

PUT abc-000001  
{  
"aliases": {  
"alias1":{  
"is\_write\_index": true  
}  
}  
}

POST alias1/my  
{  
"name":"AA"  
}

In the elasticsearch 6.6 ,i am not able to rollover the index automatically.

Please let me know if i am doing any thing wrong in the above queries  
Please help me in this

thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 4, 2019, 6:54am UTC](https://discuss.elastic.co/t/policies/166906/2 "2019-03-04T06:54:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
