# Policy

**URL:** <https://discuss.elastic.co/t/policy/166485>\
**Category:** Elasticsearch\
**Created:** [January 31, 2019, 7:23am UTC](https://discuss.elastic.co/t/policy/166485 "2019-01-31T07:23:25Z")\
**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:** [January 31, 2019, 7:23am UTC](https://discuss.elastic.co/t/policy/166485/1 "2019-01-31T07:23:26Z")

</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"  
}

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

---

<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:** [February 28, 2019, 7:23am UTC](https://discuss.elastic.co/t/policy/166485/2 "2019-02-28T07:23:27Z")

</div>

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