# Facets

**URL:** <https://discuss.elastic.co/t/facets/10760>\
**Category:** Elasticsearch\
**Created:** [February 15, 2013, 11:40pm UTC](https://discuss.elastic.co/t/facets/10760 "2013-02-15T23:40:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saud\_rehman](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@saud\_rehman](https://discuss.elastic.co/u/saud_rehman)\
**Post date:** [February 15, 2013, 11:40pm UTC](https://discuss.elastic.co/t/facets/10760/1 "2013-02-15T23:40:39Z")

</div>

Hi,

I have three indices,

index1, index2 and index3 all have field userId.

index1 = has 4 documents with userId = 12  
index2 = has 2 documents with userId = 12  
index3 = has 5 documents with userId = 12

When I perform:  
curl -X POST "[http://localhost:9200/\_search](http://localhost:9200/_search) " -d '{"facets" : {"tags" : { "terms" : {"field" : "id\_user"} } }}'

The facet count I get for userId = 12 is 5.

I am expecting it to show me 11. which is sum of all documents across all three documents with userId = 12.

---

<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:51am UTC](https://discuss.elastic.co/t/facets/10760/2 "2017-07-06T02:51:13Z")

</div>


