# Enabled = False on objects still able to search

**URL:** <https://discuss.elastic.co/t/enabled-false-on-objects-still-able-to-search/43921>\
**Category:** Elasticsearch\
**Created:** [March 9, 2016, 4:00pm UTC](https://discuss.elastic.co/t/enabled-false-on-objects-still-able-to-search/43921 "2016-03-09T16:00:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![esseti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esseti/32/8383_2.png) [@esseti](https://discuss.elastic.co/u/esseti)\
**Post date:** [March 9, 2016, 4:00pm UTC](https://discuss.elastic.co/t/enabled-false-on-objects-still-able-to-search/43921/1 "2016-03-09T16:00:30Z")

</div>

Hello,  
i've created an index like this:  
`{ "mappings":{ "doc":{ "properties":{ "json":{ "enabled":false, "type":"object" }, "string":{ "type":"string" } } } } }`

and i put inside an object like this, type is `users`  
`{ "json":{ "surname":"surname", "name":"name" }, "string":"string" }`

now i do a search like this:  
`{ "query":{ "match":{ "json.surname":"surname" } } }`

and **it works!**. But, shouldn't the `enabled=false` disable the possibility to search over it?

> Whether the JSON value given for the object field should be parsed and indexed (true, default) or completely ignored (false).

> The enabled setting, which can be applied only to the mapping type and to object fields, causes Elasticsearch to skip parsing of the contents of the field entirely. The JSON can still be retrieved from the \_source field, but it is not searchable or stored in any other way:

---

<div class="post-metadata">

**Author:** ![esseti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esseti/32/8383_2.png) [@esseti](https://discuss.elastic.co/u/esseti)\
**Post date:** [March 9, 2016, 4:02pm UTC](https://discuss.elastic.co/t/enabled-false-on-objects-still-able-to-search/43921/2 "2016-03-09T16:02:47Z")

</div>

just noticed that i'm creating the mapping for `doc` while i use `users`. that's why.  
i can delete the topic, but i don't get how to delete it.

---

<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 5, 2017, 11:09pm UTC](https://discuss.elastic.co/t/enabled-false-on-objects-still-able-to-search/43921/3 "2017-07-05T23:09:52Z")

</div>


