# Percolate query on nested document

**URL:** https://discuss.elastic.co/t/percolate-query-on-nested-document/88640
**Category:** Elasticsearch
**Created:** [June 8, 2017, 12:47am UTC](https://discuss.elastic.co/t/percolate-query-on-nested-document/88640 "2017-06-08T00:47:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vishva\_deepak\_tewari](https://avatars.discourse-cdn.com/v4/letter/v/f07891/32.png) [@vishva\_deepak\_tewari](https://discuss.elastic.co/u/vishva_deepak_tewari)
#### Post date: [June 8, 2017, 12:47am UTC](https://discuss.elastic.co/t/percolate-query-on-nested-document/88640/1 "2017-06-08T00:47:22Z")

</div>

Hi,  
I have a nested document, the mapping setting for the same is as follows

"properties" : {  
"name" : {  
"type" : "text"  
},  
"description" : {  
"type" : "text"  
},  
"rawDataColl" : {  
"type" : "nested",  
"properties" : {  
"name" : {  
"type" : "text"  
},  
"description" : {  
"type" : "text"  
}  
}  
}  
}

I am trying to use percolate query for document of the above type. The percolate query has the following query  
{  
"searchTextQuery": {  
"match": {  
"[rawDataColl.name](http://rawDataColl.name)": {  
"query": "Beautician"  
}  
}  
}  
}

When i run the percolate query it returns me correct results if the query has match element on **_name_** attribute, however if query has match element on **_[rawDataColl.name](http://rawDataColl.name)_** then percolate query does not works.

Can any one please tell me, whether percolate query is not supported on nested documents or i am doing something wrong?

Thanks  
Vishvadeepak

---

<div class="post-metadata">

### Author: ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)
#### Post date: [June 20, 2017, 8:11am UTC](https://discuss.elastic.co/t/percolate-query-on-nested-document/88640/2 "2017-06-20T08:11:36Z")

</div>

If you have a nested mapping then your percolator query should also contain a `nested` query.

---

<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 18, 2017, 8:11am UTC](https://discuss.elastic.co/t/percolate-query-on-nested-document/88640/3 "2017-07-18T08:11:44Z")

</div>

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