# Receive just matching nested object data from nested query

**URL:** <https://discuss.elastic.co/t/receive-just-matching-nested-object-data-from-nested-query/10730>\
**Category:** Elasticsearch\
**Created:** [February 13, 2013, 6:17pm UTC](https://discuss.elastic.co/t/receive-just-matching-nested-object-data-from-nested-query/10730 "2013-02-13T18:17:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tom_4/32/1045_2.png) [@Tom\_4](https://discuss.elastic.co/u/Tom_4)\
**Post date:** [February 13, 2013, 6:17pm UTC](https://discuss.elastic.co/t/receive-just-matching-nested-object-data-from-nested-query/10730/1 "2013-02-13T18:17:07Z")

</div>

Hi,

is there a way to receive just the matching nested object(s) from a  
document by a nested query resp. to identifiy the exact matching nested  
object which matched e.g. an "and" filter?  
e.g. if i query  
[http://www.elasticsearch.org/guide/reference/mapping/nested-type.html](http://www.elasticsearch.org/guide/reference/mapping/nested-type.html) obj1  
and filterng for name "blue" and count 4 i need to know which nested object  
matched this filter instead of just getting the whole document.

thx, tom

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:51am UTC](https://discuss.elastic.co/t/receive-just-matching-nested-object-data-from-nested-query/10730/2 "2017-07-06T02:51:35Z")

</div>


