# Count nested elements

**URL:** https://discuss.elastic.co/t/count-nested-elements/17062
**Category:** Elasticsearch
**Created:** [April 17, 2014, 3:35pm UTC](https://discuss.elastic.co/t/count-nested-elements/17062 "2014-04-17T15:35:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Loic\_Wenkin](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@Loic\_Wenkin](https://discuss.elastic.co/u/Loic_Wenkin)
#### Post date: [April 17, 2014, 3:35pm UTC](https://discuss.elastic.co/t/count-nested-elements/17062/1 "2014-04-17T15:35:57Z")

</div>

Hello everybody,

I am using ElasticSearch in order to switch our main storage system from a  
RDBMS system to a NoSQL system. For a particular functionality, I need to  
use some nested elements. I know how to query them but I would like to know  
if it is possible to count how many nested elements match with the query I  
write. Since nested elements indexed as separated elements, I may think it  
is doable but I don't know how to do it. Any suggestions would be great.

Thanks for your replies.

Regards,  
Loïc

--  
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/50738eb5-cd44-41f1-96e0-d90b0a4d7c96%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/50738eb5-cd44-41f1-96e0-d90b0a4d7c96%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:35am UTC](https://discuss.elastic.co/t/count-nested-elements/17062/2 "2017-07-06T01:35:12Z")

</div>


