# Facet Bug - Memory dropped from 80GB to 5GB

**URL:** <https://discuss.elastic.co/t/facet-bug-memory-dropped-from-80gb-to-5gb/10489>\
**Category:** Elasticsearch\
**Created:** [January 24, 2013, 12:21pm UTC](https://discuss.elastic.co/t/facet-bug-memory-dropped-from-80gb-to-5gb/10489 "2013-01-24T12:21:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Maia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gustavo_maia/32/2183_2.png) [@Gustavo\_Maia](https://discuss.elastic.co/u/Gustavo_Maia)\
**Post date:** [January 24, 2013, 12:21pm UTC](https://discuss.elastic.co/t/facet-bug-memory-dropped-from-80gb-to-5gb/10489/1 "2013-01-24T12:21:42Z")

</div>

Hi,

I do not know if it's a bug or even implementation decision.

The fieldCache cache uses only the name of the field that was supposed  
to be using the field name plus the name of the type, with that'd be  
avoiding making unnecessary cache.  
I had this problem and my memory consumption dropped from 80GB to 5GB.

Gustavo Maia

--

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 27, 2013, 10:37am UTC](https://discuss.elastic.co/t/facet-bug-memory-dropped-from-80gb-to-5gb/10489/2 "2013-01-27T10:37:21Z")

</div>

Regardless of a different type, in Lucene it will end up under the same field name. What did you change? Are you loading for fields only for a specific type? This will generically cause more memory usage as you start to facet across types. I would say that it smells like you are using the multi types option wrongly?

On Jan 24, 2013, at 1:21 PM, Gustavo Maia [gustavobbmaia@gmail.com](mailto:gustavobbmaia@gmail.com) wrote:

> Hi,
> 
> I do not know if it's a bug or even implementation decision.
> 
> The fieldCache cache uses only the name of the field that was supposed  
> to be using the field name plus the name of the type, with that'd be  
> avoiding making unnecessary cache.  
> I had this problem and my memory consumption dropped from 80GB to 5GB.
> 
> Gustavo Maia
> 
> --

---

<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:54am UTC](https://discuss.elastic.co/t/facet-bug-memory-dropped-from-80gb-to-5gb/10489/3 "2017-07-06T02:54:26Z")

</div>

Closed on July 6, 2017, 2:54am UTC


