# Exist nested aggregations

**URL:** <https://discuss.elastic.co/t/exist-nested-aggregations/18416>\
**Category:** Elasticsearch\
**Created:** [July 1, 2014, 1:38pm UTC](https://discuss.elastic.co/t/exist-nested-aggregations/18416 "2014-07-01T13:38:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niv\_Penso](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Niv\_Penso](https://discuss.elastic.co/u/Niv_Penso)\
**Post date:** [July 1, 2014, 1:38pm UTC](https://discuss.elastic.co/t/exist-nested-aggregations/18416/1 "2014-07-01T13:38:32Z")

</div>

Hey guys,

I have a document with a nested field called "field1".  
I want to make an aggregation exist query by "field1"

Is this possible?

What i am trying to do:  
GET viewsdata/tmoview1/\_search  
{  
"query": {  
"match\_all": {}  
},  
"aggregations":{  
"views":{  
"filter": {  
"exists": {  
"field": "msv"  
}  
}  
}  
},  
"size": 0  
}

what do i do wrong?

Thnx Niv

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a7b0eb63-edda-4467-94ff-55fb5454c4b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7b0eb63-edda-4467-94ff-55fb5454c4b5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:18am UTC](https://discuss.elastic.co/t/exist-nested-aggregations/18416/2 "2017-07-06T01:18:41Z")

</div>


