# Facet on nested object

**URL:** <https://discuss.elastic.co/t/facet-on-nested-object/7810>\
**Category:** Elasticsearch\
**Created:** [May 22, 2012, 7:00pm UTC](https://discuss.elastic.co/t/facet-on-nested-object/7810 "2012-05-22T19:00:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [May 22, 2012, 7:00pm UTC](https://discuss.elastic.co/t/facet-on-nested-object/7810/1 "2012-05-22T19:00:40Z")

</div>

Hi,

I have the following problem, I am trying to use date\_histogram facet on  
nested object. Please check the mapping, data, query and the result here:

> <https://gist.github.com/anonymous/99ca2a71742774d9786b>
>
> There are more than three files. show original

  
The result for facet1 is empty, could you help me fix this issue ? I have  
the same situation when I follow the example from here:  
[http://www.elasticsearch.org/guide/reference/api/search/facets/](http://www.elasticsearch.org/guide/reference/api/search/facets/) (Facets  
with the nested types), the result for facet1 is empty.

Thanks.  
Best regards.

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [May 22, 2012, 7:20pm UTC](https://discuss.elastic.co/t/facet-on-nested-object/7810/2 "2012-05-22T19:20:48Z")

</div>

It's interesting, after upgrading ES from 0.19.3 to 0.19.4 the query works  
fine and returns correct results.

2012/5/22 Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)

> Hi,
> 
> I have the following problem, I am trying to use date\_histogram facet on  
> nested object. Please check the mapping, data, query and the result here:  
> [Elastic search - facet on nested object · GitHub](https://gist.github.com/99ca2a71742774d9786b)  
> The result for facet1 is empty, could you help me fix this issue ? I have  
> the same situation when I follow the example from here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/facets/) (Facets  
> with the nested types), the result for facet1 is empty.
> 
> Thanks.  
> Best regards.

---

<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:27am UTC](https://discuss.elastic.co/t/facet-on-nested-object/7810/3 "2017-07-06T03:27:37Z")

</div>


