# Indexing child field of disabled JSON

**URL:** <https://discuss.elastic.co/t/indexing-child-field-of-disabled-json/126485>\
**Category:** Elasticsearch\
**Created:** [April 3, 2018, 1:22am UTC](https://discuss.elastic.co/t/indexing-child-field-of-disabled-json/126485 "2018-04-03T01:22:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahzaib\_Gill](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Shahzaib\_Gill](https://discuss.elastic.co/u/Shahzaib_Gill)\
**Post date:** [April 3, 2018, 1:22am UTC](https://discuss.elastic.co/t/indexing-child-field-of-disabled-json/126485/1 "2018-04-03T01:22:18Z")

</div>

I have a case where a certain field of the incoming JSON does not hold type integrity, so I don't index it in elasticsearch, by setting enabled = false.

However, I want to enable a subfield of that JSON to be indexed. Is this possible?

Eg:  
{  
"settings" : {  
"number\_of\_shards" : 3,  
"number\_of\_replicas" : 2  
},  
"mappings": {  
"\_doc": {  
"properties": {  
"field\_1": {  
"enabled": false,  
"properties": {  
"field\_2":{  
"type": "object",  
"enabled": true  
}  
}  
}  
}  
}  
}  
}

Thank you

---

<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:** [May 1, 2018, 1:22am UTC](https://discuss.elastic.co/t/indexing-child-field-of-disabled-json/126485/2 "2018-05-01T01:22:26Z")

</div>

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