# Count facet range in nested?

**URL:** <https://discuss.elastic.co/t/count-facet-range-in-nested/11415>\
**Category:** Elasticsearch\
**Created:** [April 2, 2013, 4:38pm UTC](https://discuss.elastic.co/t/count-facet-range-in-nested/11415 "2013-04-02T16:38:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![softtech\_Wonder](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@softtech\_Wonder](https://discuss.elastic.co/u/softtech_Wonder)\
**Post date:** [April 2, 2013, 4:38pm UTC](https://discuss.elastic.co/t/count-facet-range-in-nested/11415/1 "2013-04-02T16:38:06Z")

</div>

My data  
var user1 = {"friends": array(idFriend1, idFriend2, idFriend3,  
idFriend4,...,idFriendN)}  
var user2 = {"friends": array(idFriend1, idFriend2, idFriend3,  
idFriend4,...,idFriendN)}  
var userN= {"friends": array(.....)}  
I want to list and count all persons who have 0-10 friends, 11-100 friends,  
etc...  
I had tried many ways to manage but it isn't successfully. Who knows how to  
solve this problem, please guide me. Thanks a lot!

--  
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:43am UTC](https://discuss.elastic.co/t/count-facet-range-in-nested/11415/2 "2017-07-06T02:43:14Z")

</div>


