# Memory error in term facet

**URL:** <https://discuss.elastic.co/t/memory-error-in-term-facet/5557>\
**Category:** Elasticsearch\
**Created:** [October 11, 2011, 8:12am UTC](https://discuss.elastic.co/t/memory-error-in-term-facet/5557 "2011-10-11T08:12:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [October 11, 2011, 8:12am UTC](https://discuss.elastic.co/t/memory-error-in-term-facet/5557/1 "2011-10-11T08:12:57Z")

</div>

Hi,

I am running term facet query on Elastic search. I am having Index size 5GB  
and total 2M documents.  
On running term facet I am getting error for java heap space.

My index request is as follows

curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{  
"type": "couchdb",  
"couchdb" : {  
"host" : "localhost",  
"port": 5984,  
"db" : "tweet\_db"  
},  
"index" : {  
"index" : "pa\_index2",  
"type" : "pa\_index\_feed2",  
"bulk\_size" : "100",  
"bulk\_timeout" : "10ms"},  
"mapping":{"tweet":{"properties":{"polarity":{"type":"integer"}}}}  
}  
'

Please help.

Regards,  
Pulkit Agrawal

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 11, 2011, 9:16am UTC](https://discuss.elastic.co/t/memory-error-in-term-facet/5557/2 "2011-10-11T09:16:37Z")

</div>

You provide a river request not the facet request.  
The way you get your documents have no relation to your facet searches.

You have also to give more details about your configuration : memory allocated  
to ES (Xmx, ...), How many shards for your index, how many nodes, ...

FYI, I also get memory errors with facets over 2M docs but it's mainly beacause  
I'm doing tests on small instances (Windows with only 1,5 Go allocated to ES).

Le 11 octobre 2011 à 10:12, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com) a écrit :

> Hi,
> 
> I am running term facet query on Elastic search. I am having Index size 5GB  
> and total 2M documents.  
> On running term facet I am getting error for java heap space.
> 
> My index request is as follows
> 
> curl -XPUT 'localhost:9200/\_river/pa\_index2/\_meta' -d '{  
> "type": "couchdb",  
> "couchdb" : {  
> "host" : "localhost",  
> "port": 5984,  
> "db" : "tweet\_db"  
> },  
> "index" : {  
> "index" : "pa\_index2",  
> "type" : "pa\_index\_feed2",  
> "bulk\_size" : "100",  
> "bulk\_timeout" : "10ms"},  
> "mapping":{"tweet":{"properties":{"polarity":{"type":"integer"}}}}  
> }  
> '
> 
> Please help.
> 
> Regards,  
> Pulkit Agrawal  
> --  
> David Pilato  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet

---

<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:52am UTC](https://discuss.elastic.co/t/memory-error-in-term-facet/5557/3 "2017-07-06T03:52:26Z")

</div>


