# Nested field query

**URL:** <https://discuss.elastic.co/t/nested-field-query/130803>\
**Category:** Elasticsearch\
**Created:** [May 7, 2018, 9:29am UTC](https://discuss.elastic.co/t/nested-field-query/130803 "2018-05-07T09:29:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [May 7, 2018, 9:29am UTC](https://discuss.elastic.co/t/nested-field-query/130803/1 "2018-05-07T09:29:29Z")

</div>

Hi All,

Could someone please help me on below requirement,

"industryCodes": {  
"industryCodeTypes": [  
{  
"typeCode": "1016",  
"typeDescription": "xxxx",  
"industryCode": {  
"code": "6111",  
"description": true  
}  
},  
{  
"typeCode": "19295",  
"typeDescription": "xxxx",  
"industryCode": {  
"code": "64999",  
"description": true  
}  
}  
]  
}

I need query to get the documents on the combination of typeCode and industryCode.code. As these are the nested, we don't have a separate mapping file, we are following dynamic mapping. So I can't see any keyword called nested in the mapping file.

could you please help me on writing query to get the documents.

Thanks & Regards,  
Ram Prasad G

---

<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:** [June 4, 2018, 9:29am UTC](https://discuss.elastic.co/t/nested-field-query/130803/2 "2018-06-04T09:29:30Z")

</div>

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