# Error "ReduceSearchPhaseException"

**URL:** <https://discuss.elastic.co/t/error-reducesearchphaseexception/16030>\
**Category:** Elasticsearch\
**Created:** [February 26, 2014, 1:18pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030 "2014-02-26T13:18:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [February 26, 2014, 1:18pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/1 "2014-02-26T13:18:43Z")

</div>

Hi All,  
I am executing a cluster query to fetch the documents and cluster it using Carrot2.

If I am doing the query with the words " **mobiles, samsung, test**" it works fine but if I do the query with word " **mobile**" it is giving the following exception.  
 **error: ReduceSearchPhaseException[Failed to execute phase [fetch], [reduce] ]; nested: c[bytes can be at most 32766 in length; got 131074];  
status: 503**

Any solution to solve such type of exception or how I can find the root cause for the same?

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [February 28, 2014, 8:57am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/2 "2014-02-28T08:57:00Z")

</div>

Hello All,

Did any one encountered the same issue if yes then please let me know the solution.

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [February 28, 2014, 2:59pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/3 "2014-02-28T14:59:48Z")

</div>

Prahy,  
Although I don't know the solution,  
It does look like using a RegEx in your query is causing an overflow of a byte length limit.

Accordingly, I suspect if you can find the setting for that, it should solve your problem.

Tony

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cbda72ac-10a1-4daa-8a25-c91527f0bfd0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbda72ac-10a1-4daa-8a25-c91527f0bfd0%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [March 3, 2014, 5:47am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/4 "2014-03-03T05:47:25Z")

</div>

Tony,  
I am not using any Regex in my query explicitly.

Is there any place in config file or somewhere else where I can confirm for the same if its taking internally?

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [March 3, 2014, 11:47am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/5 "2014-03-03T11:47:16Z")

</div>

Hi All,

Below is the logs for the same issue:

[2014-03-03 22:40:24,956][DEBUG][action.search.type] [Node164] failed to reduce search  
org.elasticsearch.action.search.ReduceSearchPhaseException: Failed to execute phase [fetch], [reduce]  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:182)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:156)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:150)  
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:407)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:150)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:134)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:636)  
Caused by: lingo3g.ft$c: bytes can be at most 32766 in length; got 131074  
at lingo3g.ft.a(Unknown Source)  
at lingo3g.ft.a(Unknown Source)  
at lingo3g.cx.a(Unknown Source)  
at lingo3g.cx.a(Unknown Source)  
at lingo3g.df.b(Unknown Source)  
at lingo3g.df.a(Unknown Source)  
at lingo3g.v.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown Source)  
at org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:237)  
at org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:119)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown Source)  
at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106)  
at org.carrot2.core.Controller.process(Controller.java:356)  
at org.carrot2.core.Controller.process(Controller.java:269)  
at org.carrot2.elasticsearch.ClusteringAction$TransportClusteringAction$1.onResponse(ClusteringAction.java:664)  
at org.carrot2.elasticsearch.ClusteringAction$TransportClusteringAction$1.onResponse(ClusteringAction.java:623)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.innerFinishHim(TransportSearchQueryThenFetchAction.java:198)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:180)  
... 8 more

---

<div class="post-metadata">

**Author:** ![Dawid\_Weiss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dawid_weiss/32/1643_2.png) [@Dawid\_Weiss](https://discuss.elastic.co/u/Dawid_Weiss)\
**Post date:** [March 3, 2014, 12:01pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/6 "2014-03-03T12:01:02Z")

</div>

> Caused by: lingo3g.ft$c: bytes can be at most 32766 in length; got 131074

Looks like something is not playing nice on the Lingo3G-Carrot2-ES  
boundary. Let me investigate.

Dawid

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt\_qXAyJ5vNjNTBG8cQ3-Rcdg\_barD6REvuWt0SRK4wZag%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt_qXAyJ5vNjNTBG8cQ3-Rcdg_barD6REvuWt0SRK4wZag%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [March 3, 2014, 12:22pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/7 "2014-03-03T12:22:53Z")

</div>

Ok Dawid, waiting for your reply...

Some info which might help wrt ES and all I am using:

ES version: 1.0.1  
Lingo3g Version: 1.9.0  
Clustering Plugin version: 1.3.0

---

<div class="post-metadata">

**Author:** ![Dawid\_Weiss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dawid_weiss/32/1643_2.png) [@Dawid\_Weiss](https://discuss.elastic.co/u/Dawid_Weiss)\
**Post date:** [March 3, 2014, 1:24pm UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/8 "2014-03-03T13:24:52Z")

</div>

This is a bug in Lingo3G. It will only manifest itself if you have  
single tokens ("words") that exceed over 30k in UTF8... So in reality  
it shouldn't be the case unless you're trying to cluster languages  
without whitespace delimiters (and with incorrect language  
preprocessing option for Lingo3G).

Could you provide a repeatable test case to my e-mail address if the  
above is not the case? We will try to fix the bug in the next release  
but I still think you should cluster on fields that don't contain such  
awkward tokens.

Dawid

On Mon, Mar 3, 2014 at 1:22 PM, prashy [prashant.agrawal@paladion.net](mailto:prashant.agrawal@paladion.net) wrote:

> Ok Dawid, waiting for your reply...
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4050805.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4050805.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1393849374162-4050805.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1393849374162-4050805.post%40n3.nabble.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt91S143TKxrfxbBiO1xMLjg6F9TcFJTq6KKLMv%2BaXEy8A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt91S143TKxrfxbBiO1xMLjg6F9TcFJTq6KKLMv%2BaXEy8A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [March 4, 2014, 5:22am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/9 "2014-03-04T05:22:57Z")

</div>

I have sent the particular scenario in which I am getting the error. Also I am using common words token only for search not any awkward tokens.

So just let me know if the issue gets fixed or any temporary solution is there to solve the same.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [March 4, 2014, 7:07am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/10 "2014-03-04T07:07:56Z")

</div>

One more observation in above scenario.

1. The records returned by the "mobile" is 287 so if I set the "size" (in query) as \< 287 it is working fine but in case of \>=287 it is throwing the exception.

2. The records returned by the "samsung" is 191 so if I set the "size" as \< 191 it is working fine also in case of \>=191 it is working fine.

So just to conclude the keywords which are throwing exception works fine if I am giving the size \<= total records. But I hope it(size) shouldn't be dependent on the number of records returned.

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [April 4, 2014, 6:35am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/11 "2014-04-04T06:35:34Z")

</div>

Hi Dawid,

As you proposed the lingo3g jar file with quick fix so it was working fine but today I got the issue again wrt search query.

Below is the logs for the same let me know if anything can be done for the same.

[2014-04-04 16:58:07,380][DEBUG][action.search.type] [Node164] [20] Failed to execute fetch phase  
java.lang.OutOfMemoryError: Java heap space  
at com.carrotsearch.hppc.IntArrayList.ensureBufferSpace(IntArrayList.java:368)  
at com.carrotsearch.hppc.IntStack.push(IntStack.java:75)  
at lingo3g.co.a(Unknown Source)  
at lingo3g.cx.a(Unknown Source)  
at lingo3g.cx.a(Unknown Source)  
at lingo3g.df.b(Unknown Source)  
at lingo3g.df.a(Unknown Source)  
at lingo3g.v.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown Source)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown Source)  
at org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:231)  
at org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:119)  
at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown Source)  
at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106)  
at org.carrot2.core.Controller.process(Controller.java:356)  
at org.carrot2.core.Controller.process(Controller.java:269)  
at org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:97)  
at org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:58)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.innerFinishHim(TransportSearchQueryThenFetchAction.java:190)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:172)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:152)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:146)  
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:346)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:146)  
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:133)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:636)

---

<div class="post-metadata">

**Author:** ![Dawid\_Weiss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dawid_weiss/32/1643_2.png) [@Dawid\_Weiss](https://discuss.elastic.co/u/Dawid_Weiss)\
**Post date:** [April 4, 2014, 6:38am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/12 "2014-04-04T06:38:54Z")

</div>

> java.lang.OutOfMemoryError: Java heap space

Increase heap space for Elastic Search? You're probably trying to  
cluster large documents (or a large number of snippets). Lingo3G is  
designed to cluster 1000-5000 docs, fast, but in-memory. For larger  
document collections you need to increase the heap or switch to  
off-line clustering with other software (Apache Mahout, for example).

Dawid

On Fri, Apr 4, 2014 at 8:35 AM, Prashant Agrawal  
[prashant.agrawal@paladion.net](mailto:prashant.agrawal@paladion.net) wrote:

> Hi Dawid,
> 
> As you proposed the lingo3g jar file with quick fix so it was working fine  
> but today I got the issue again wrt search query.
> 
> Below is the logs for the same let me know if anything can be done for the  
> same.
> 
> [2014-04-04 16:58:07,380][DEBUG][action.search.type] [Node164] [20]  
> Failed to execute fetch phase  
> java.lang.OutOfMemoryError: Java heap space  
> at  
> com.carrotsearch.hppc.IntArrayList.ensureBufferSpace(IntArrayList.java:368)  
> at com.carrotsearch.hppc.IntStack.push(IntStack.java:75)  
> at lingo3g.co.a(Unknown Source)  
> at lingo3g.cx.a(Unknown Source)  
> at lingo3g.cx.a(Unknown Source)  
> at lingo3g.df.b(Unknown Source)  
> at lingo3g.df.a(Unknown Source)  
> at lingo3g.v.a(Unknown Source)  
> at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown  
> Source)  
> at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown  
> Source)  
> at  
> com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown  
> Source)  
> at  
> org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:231)  
> at  
> org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:119)  
> at  
> com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown Source)  
> at  
> org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106)  
> at org.carrot2.core.Controller.process(Controller.java:356)  
> at org.carrot2.core.Controller.process(Controller.java:269)  
> at  
> org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:97)  
> at  
> org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:58)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.innerFinishHim(TransportSearchQueryThenFetchAction.java:190)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:172)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:152)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:146)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:346)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:146)  
> at  
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:133)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:636)
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt\_vn\_%2BMVi%3DzYoTUJjG2cpbWv\_aOQ7\_SWgYc2mW2dsMRYw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt_vn_%2BMVi%3DzYoTUJjG2cpbWv_aOQ7_SWgYc2mW2dsMRYw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [April 4, 2014, 6:46am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/13 "2014-04-04T06:46:40Z")

</div>

Actually this exception I am getting, consists of clustering ~300 records of size ~10KB each.

Also doubled the heap size by using ES\_MAX\_MEM parameter in elasticsearch.in.sh

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [April 4, 2014, 6:55am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/14 "2014-04-04T06:55:12Z")

</div>

Actually this exception I am getting, consists of clustering ~300 records  
of size ~10KB each.

Also doubled the heap size by using ES\_MAX\_MEM parameter in  
elasticsearch.in.sh

_Regards,_  
_~Prashant_  
_+91-8097606642_

On Fri, Apr 4, 2014 at 12:10 PM, Dawid Weiss [via Elasticsearch Users] \<  
[ml-node+s115913n4053490h46@n3.nabble.com](mailto:ml-node+s115913n4053490h46@n3.nabble.com)\> wrote:

> > java.lang.OutOfMemoryError: Java heap space
> 
> Increase heap space for Elastic Search? You're probably trying to  
> cluster large documents (or a large number of snippets). Lingo3G is  
> designed to cluster 1000-5000 docs, fast, but in-memory. For larger  
> document collections you need to increase the heap or switch to  
> off-line clustering with other software (Apache Mahout, for example).
> 
> Dawid
> 
> On Fri, Apr 4, 2014 at 8:35 AM, Prashant Agrawal  
> \<[hidden email] [http://user/SendEmail.jtp?type=node&node=4053490&i=0](http://user/SendEmail.jtp?type=node&node=4053490&i=0)\>  
> wrote:
> 
> > Hi Dawid,
> > 
> > As you proposed the lingo3g jar file with quick fix so it was working  
> > fine  
> > but today I got the issue again wrt search query.
> > 
> > Below is the logs for the same let me know if anything can be done for  
> > the  
> > same.
> > 
> > [2014-04-04 16:58:07,380][DEBUG][action.search.type] [Node164]  
> > [20]  
> > Failed to execute fetch phase  
> > java.lang.OutOfMemoryError: Java heap space  
> > at
> 
> com.carrotsearch.hppc.IntArrayList.ensureBufferSpace(IntArrayList.java:368)
> 
> > ```
> > at com.carrotsearch.hppc.IntStack.push(IntStack.java:75)
> > at lingo3g.co.a(Unknown Source)
> > at lingo3g.cx.a(Unknown Source)
> > at lingo3g.cx.a(Unknown Source)
> > at lingo3g.df.b(Unknown Source)
> > at lingo3g.df.a(Unknown Source)
> > at lingo3g.v.a(Unknown Source)
> > at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown
> > 
> > ```
> > 
> > Source)  
> > at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown  
> > Source)  
> > at  
> > com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown  
> > Source)  
> > at
> 
> org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:231)
> 
> > ```
> > at
> > 
> > ```
> 
> org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:119)
> 
> > ```
> > at
> > 
> > ```
> > 
> > com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown  
> > Source)  
> > at
> 
> org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106)
> 
> > ```
> > at org.carrot2.core.Controller.process(Controller.java:356)
> > at org.carrot2.core.Controller.process(Controller.java:269)
> > at
> > 
> > ```
> 
> org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:97)
> 
> > ```
> > at
> > 
> > ```
> 
> org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:58)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.innerFinishHim(TransportSearchQueryThenFetchAction.java:190)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:172)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:152)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:146)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:346)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:146)
> 
> > ```
> > at
> > 
> > ```
> 
> org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:133)
> 
> > ```
> > at
> > 
> > ```
> 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 
> > ```
> > at
> > 
> > ```
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 
> > ```
> > at java.lang.Thread.run(Thread.java:636)
> > 
> > ```
> > 
> > --  
> > View this message in context:  
> > [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html)
> 
> > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > 
> > --  
> > You received this message because you are subscribed to the Google  
> > Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send  
> > an email to [hidden email][http://user/SendEmail.jtp?type=node&node=4053490&i=1](http://user/SendEmail.jtp?type=node&node=4053490&i=1).
> 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com).
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [hidden email][http://user/SendEmail.jtp?type=node&node=4053490&i=2](http://user/SendEmail.jtp?type=node&node=4053490&i=2).
> 
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt\_vn\_%2BMVi%3DzYoTUJjG2cpbWv\_aOQ7\_SWgYc2mW2dsMRYw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt_vn_%2BMVi%3DzYoTUJjG2cpbWv_aOQ7_SWgYc2mW2dsMRYw%40mail.gmail.com).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> * * *
> 
> If you reply to this email, your message will be added to the discussion  
> below:
> 
> [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053490.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053490.html)  
> To unsubscribe from Error "ReduceSearchPhaseException", click here[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe\_by\_code&node=4050531&code=cHJhc2hhbnQuYWdyYXdhbEBwYWxhZGlvbi5uZXR8NDA1MDUzMXwtMTkxMzg2NjkyMw==](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4050531&code=cHJhc2hhbnQuYWdyYXdhbEBwYWxhZGlvbi5uZXR8NDA1MDUzMXwtMTkxMzg2NjkyMw==)  
> .  
> NAML[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)

---

<div class="post-metadata">

**Author:** ![Dawid\_Weiss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dawid_weiss/32/1643_2.png) [@Dawid\_Weiss](https://discuss.elastic.co/u/Dawid_Weiss)\
**Post date:** [April 4, 2014, 7:03am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/15 "2014-04-04T07:03:48Z")

</div>

Increase the heap. Can't say what the problem is without having the data.

D.

On Fri, Apr 4, 2014 at 8:55 AM, Prashant Agrawal  
[prashant.agrawal@paladion.net](mailto:prashant.agrawal@paladion.net) wrote:

> Actually this exception I am getting, consists of clustering ~300 records of  
> size ~10KB each.
> 
> Also doubled the heap size by using ES\_MAX\_MEM parameter in  
> elasticsearch.in.sh
> 
> Regards,  
> ~Prashant  
> +91-8097606642
> 
> On Fri, Apr 4, 2014 at 12:10 PM, Dawid Weiss [via Elasticsearch Users]  
> \<[hidden email]\> wrote:
> 
> > > java.lang.OutOfMemoryError: Java heap space
> > 
> > Increase heap space for Elastic Search? You're probably trying to  
> > cluster large documents (or a large number of snippets). Lingo3G is  
> > designed to cluster 1000-5000 docs, fast, but in-memory. For larger  
> > document collections you need to increase the heap or switch to  
> > off-line clustering with other software (Apache Mahout, for example).
> > 
> > Dawid
> > 
> > On Fri, Apr 4, 2014 at 8:35 AM, Prashant Agrawal  
> > \<[hidden email]\> wrote:
> > 
> > > Hi Dawid,
> > > 
> > > As you proposed the lingo3g jar file with quick fix so it was working  
> > > fine  
> > > but today I got the issue again wrt search query.
> > > 
> > > Below is the logs for the same let me know if anything can be done for  
> > > the  
> > > same.
> > > 
> > > [2014-04-04 16:58:07,380][DEBUG][action.search.type] [Node164]  
> > > [20]  
> > > Failed to execute fetch phase  
> > > java.lang.OutOfMemoryError: Java heap space  
> > > at
> > > 
> > > com.carrotsearch.hppc.IntArrayList.ensureBufferSpace(IntArrayList.java:368)  
> > > at com.carrotsearch.hppc.IntStack.push(IntStack.java:75)  
> > > at lingo3g.co.a(Unknown Source)  
> > > at lingo3g.cx.a(Unknown Source)  
> > > at lingo3g.cx.a(Unknown Source)  
> > > at lingo3g.df.b(Unknown Source)  
> > > at lingo3g.df.a(Unknown Source)  
> > > at lingo3g.v.a(Unknown Source)  
> > > at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown  
> > > Source)  
> > > at com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.a(Unknown  
> > > Source)  
> > > at  
> > > com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm$1.process(Unknown  
> > > Source)  
> > > at
> > > 
> > > org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:231)  
> > > at
> > > 
> > > org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:119)  
> > > at  
> > > com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm.process(Unknown  
> > > Source)  
> > > at
> > > 
> > > org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:106)  
> > > at org.carrot2.core.Controller.process(Controller.java:356)  
> > > at org.carrot2.core.Controller.process(Controller.java:269)  
> > > at
> > > 
> > > org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:97)  
> > > at
> > > 
> > > org.carrot2.elasticsearch.TransportCarrot2ClusteringAction$1.onResponse(TransportCarrot2ClusteringAction.java:58)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.innerFinishHim(TransportSearchQueryThenFetchAction.java:190)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.finishHim(TransportSearchQueryThenFetchAction.java:172)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:152)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$3.onResult(TransportSearchQueryThenFetchAction.java:146)  
> > > at
> > > 
> > > org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:346)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:146)  
> > > at
> > > 
> > > org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:133)  
> > > at
> > > 
> > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> > > at
> > > 
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> > > at java.lang.Thread.run(Thread.java:636)
> > > 
> > > --  
> > > View this message in context:  
> > > [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053489.html)
> > 
> > > Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [hidden email].  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1396593334717-4053489.post%40n3.nabble.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [hidden email].  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt\_vn\_%2BMVi%3DzYoTUJjG2cpbWv\_aOQ7\_SWgYc2mW2dsMRYw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt_vn_%2BMVi%3DzYoTUJjG2cpbWv_aOQ7_SWgYc2mW2dsMRYw%40mail.gmail.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > * * *
> > 
> > If you reply to this email, your message will be added to the discussion  
> > below:
> > 
> > [http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053490.html](http://elasticsearch-users.115913.n3.nabble.com/Error-ReduceSearchPhaseException-tp4050531p4053490.html)  
> > To unsubscribe from Error "ReduceSearchPhaseException", click here.  
> > NAML
> 
> * * *
> 
> View this message in context: Re: Error "ReduceSearchPhaseException"
> 
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAH5tP2\_Jim1DBj79FM\_rw\_FnBS1yf%2BsjTi\_V53zyE49XYL9M\_A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH5tP2_Jim1DBj79FM_rw_FnBS1yf%2BsjTi_V53zyE49XYL9M_A%40mail.gmail.com).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAM21Rt\_TtZf2-928%3Dd2NozCRr4HeV4BQb\_pHPkX6RBhP4YjhHA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAM21Rt_TtZf2-928%3Dd2NozCRr4HeV4BQb_pHPkX6RBhP4YjhHA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)\
**Post date:** [April 8, 2014, 8:18am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/16 "2014-04-08T08:18:49Z")

</div>

Hi,

While doing the clustering with wild card search its giving the exception but without wild card its working fine.

for ex.  
executing the below query works fine:  
{  
"search\_request": {  
"fields": [  
"Content",  
"SessionAtt"  
],  
"query": {  
"query\_string": {  
"query": "com",  
"fields": [  
"Content",  
"SessionAtt"  
]  
}  
},  
"size": 500,  
"from": 0,  
"highlight": {  
"fields": {  
"Content": {},  
"SessionAtt": {}  
}  
}  
},  
"query\_hint": "company",  
"field\_mapping": {  
"content": [  
"fields.Content",  
"fields.SessionAtt"  
]  
},  
"algorithm": "lingo3g"  
}

But instead if i modify the query string query as "query": "_com_", this throws the same exception as mentioned in previous posts.

So is there any workaround for the same?

---

<div class="post-metadata">

**Author:** ![EmilToulson](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@EmilToulson](https://discuss.elastic.co/u/EmilToulson)\
**Post date:** [August 14, 2014, 9:00am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/17 "2014-08-14T09:00:10Z")

</div>

As you know that the mobile phone signal jammer can cut off the signals of the mobile phones and soon make it impossible to make phone calls or send messages. In this way when you need the peaceful condition and want to stay in it, you can just use the best mobile phone jammer to help you achieve your goal. And now as the technology develops with high speed the advanced **[bluetooth blocker](http://www.worldjammer.com/categories/WiFi%7B47%7DBluetooth_Signal_Jammer/)** has come into the market and are well welcomed by the group of people who need the jammer product.

---

<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, 1:08am UTC](https://discuss.elastic.co/t/error-reducesearchphaseexception/16030/18 "2017-07-06T01:08:39Z")

</div>


