# Aggregations on innerhits with Elastic 6.0

**URL:** <https://discuss.elastic.co/t/aggregations-on-innerhits-with-elastic-6-0/111532>\
**Category:** Elasticsearch\
**Created:** [December 13, 2017, 10:17am UTC](https://discuss.elastic.co/t/aggregations-on-innerhits-with-elastic-6-0/111532 "2017-12-13T10:17:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arth](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@Arth](https://discuss.elastic.co/u/Arth)\
**Post date:** [December 13, 2017, 10:17am UTC](https://discuss.elastic.co/t/aggregations-on-innerhits-with-elastic-6-0/111532/1 "2017-12-13T10:17:42Z")

</div>

Hi,  
Is it possible to make aggregations on nested innerhits in Java please ?

{ "product":  
{ "properties":  
{  
"productid": { "type": "integer" },  
"productname": { "type": "text" },  
"categoryid": { "type": "integer" },  
"sellers":  
{  
"type": "nested",  
"properties":  
{  
"sellerid": { "type": "integer" },  
"sellername": { "type": "text" },  
"salesnumber": { "type": "integer" },  
}  
}  
}  
}  
}

Example : Aggregation (key = sellerid, doccount : number of products) for categoryid = 5 and salesnumber \> 10

Thanks

---

<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:** [January 10, 2018, 10:17am UTC](https://discuss.elastic.co/t/aggregations-on-innerhits-with-elastic-6-0/111532/2 "2018-01-10T10:17:43Z")

</div>

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