# Nested and faceting

**URL:** https://discuss.elastic.co/t/nested-and-faceting/8506
**Category:** Elasticsearch
**Created:** [July 24, 2012, 8:12pm UTC](https://discuss.elastic.co/t/nested-and-faceting/8506 "2012-07-24T20:12:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pric](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@pric](https://discuss.elastic.co/u/pric)
#### Post date: [July 24, 2012, 8:12pm UTC](https://discuss.elastic.co/t/nested-and-faceting/8506/1 "2012-07-24T20:12:14Z")

</div>

Hello,  
I have a document with nested mapping.

{  
"obj1" : [  
{  
"name" : ["fr","de"] ,  
"count" : 4  
},  
{  
"name" : ["en","de"] ,  
"count" : 6  
}  
]  
}

Now if I do a term facet with scope I get:  
fr = 1, en = 1, de = 2

I would like to get:  
fr = 1, en = 1, de = 1  
Just count token one time by document.  
Is it possible? 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: [July 6, 2017, 3:19am UTC](https://discuss.elastic.co/t/nested-and-faceting/8506/2 "2017-07-06T03:19:13Z")

</div>


