# Default mapping not working

**URL:** <https://discuss.elastic.co/t/default-mapping-not-working/14295>\
**Category:** Elasticsearch\
**Created:** [November 6, 2013, 11:47pm UTC](https://discuss.elastic.co/t/default-mapping-not-working/14295 "2013-11-06T23:47:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![afrohlich](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@afrohlich](https://discuss.elastic.co/u/afrohlich)\
**Post date:** [November 6, 2013, 11:47pm UTC](https://discuss.elastic.co/t/default-mapping-not-working/14295/1 "2013-11-06T23:47:31Z")

</div>

I'm trying to set up a default ttl using the default-mapping.json file.  
The file is in conf/ and contains the following:  
{  
"_default_" : {  
"\_ttl" : { "enabled" : true, "default" : "7d" }  
}  
}

When I use curl -XGET "[my ip]:9200/\_mapping?pretty=1" new index/type pairs do not have \_ttl enabled in their mapping. Is there another setting that I need to change for this to work?

Also, this is using the .deb package and the accompanying init script. This setup worked when I ran it from the zip archive.

---

<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:** [July 6, 2017, 2:08am UTC](https://discuss.elastic.co/t/default-mapping-not-working/14295/2 "2017-07-06T02:08:27Z")

</div>


