# Java client index update is threaded - problem when used in Lotes Notes

**URL:** <https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040>\
**Category:** Elasticsearch\
**Created:** [December 1, 2011, 3:31pm UTC](https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040 "2011-12-01T15:31:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Marko](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@David\_Marko](https://discuss.elastic.co/u/David_Marko)\
**Post date:** [December 1, 2011, 3:31pm UTC](https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040/1 "2011-12-01T15:31:50Z")

</div>

I'm trying to use ElasticSearch in my web application built on IBM Domino  
server(formerly Lotus Notes server). I'm using JAVA Client API ...  
fetching items is fine but I have a problems with scheduled process that  
is responsible for index updates in Elastic. Update finishes fine but the  
scheduled process ends with message that it can't clean up all threads(and  
doesnt run anymore until I restart the server). I found that  
client.prepareIndex().execute() runs in sepearate threads that probably  
causes the problems Is there a way how to disable this behaviour or how to  
wait on all threads to complete? I tried .setOperationThreaded(false) but  
it doesnt work for me(also docs says it works only for local calls but I'm  
using TransportClient)

Any idea how to solve this?

Thanks,  
David

---

<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:** [December 1, 2011, 4:16pm UTC](https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040/2 "2011-12-01T16:16:36Z")

</div>

The client itself is threaded because of the networking layer (netty), no  
way around it. If it does not allow for threads, then you might need to go  
through the http REST endpoint.

On Thu, Dec 1, 2011 at 5:31 PM, David Marko [dmarko484@gmail.com](mailto:dmarko484@gmail.com) wrote:

> I'm trying to use Elasticsearch in my web application built on IBM Domino  
> server(formerly Lotus Notes server). I'm using JAVA Client API ...  
> fetching items is fine but I have a problems with scheduled process that  
> is responsible for index updates in Elastic. Update finishes fine but the  
> scheduled process ends with message that it can't clean up all threads(and  
> doesnt run anymore until I restart the server). I found that  
> client.prepareIndex().execute() runs in sepearate threads that probably  
> causes the problems Is there a way how to disable this behaviour or how to  
> wait on all threads to complete? I tried .setOperationThreaded(false) but  
> it doesnt work for me(also docs says it works only for local calls but I'm  
> using TransportClient)
> 
> Any idea how to solve this?
> 
> Thanks,  
> David

---

<div class="post-metadata">

**Author:** ![David\_Marko](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@David\_Marko](https://discuss.elastic.co/u/David_Marko)\
**Post date:** [December 1, 2011, 7:59pm UTC](https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040/3 "2011-12-01T19:59:13Z")

</div>

Anyone have some tip for JAVA REST library that fits ElasticSearch well? Is  
there anyone who uses java rest when talking to ES?

David

---

<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:46am UTC](https://discuss.elastic.co/t/java-client-index-update-is-threaded-problem-when-used-in-lotes-notes/6040/4 "2017-07-06T03:46:41Z")

</div>


