# \[Java API\] Is QueryBuiler thread safe?

**URL:** <https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712>\
**Category:** Elasticsearch\
**Created:** [February 11, 2014, 2:25am UTC](https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712 "2014-02-11T02:25:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arinto\_Murdopo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arinto_murdopo/32/1779_2.png) [@Arinto\_Murdopo](https://discuss.elastic.co/u/Arinto_Murdopo)\
**Post date:** [February 11, 2014, 2:25am UTC](https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712/1 "2014-02-11T02:25:22Z")

</div>

Hi all,

Is QueryBuilder implementation thread-safe?  
I plan to use one static QueryBuilder class that is shared by several  
threads.

Best regards,

Arinto

--  
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/e5bdb747-d412-42af-8b7e-fc6157b33bad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e5bdb747-d412-42af-8b7e-fc6157b33bad%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:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [February 11, 2014, 2:42am UTC](https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712/2 "2014-02-11T02:42:59Z")

</div>

None of the builders are thread safe, no. I believe they are all quite  
light weight though.

On Mon, Feb 10, 2014 at 9:25 PM, Arinto Murdopo [arinto@gmail.com](mailto:arinto@gmail.com) wrote:

> Hi all,
> 
> Is QueryBuilder implementation thread-safe?  
> I plan to use one static QueryBuilder class that is shared by several  
> threads.
> 
> Best regards,
> 
> Arinto
> 
> --  
> 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/e5bdb747-d412-42af-8b7e-fc6157b33bad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e5bdb747-d412-42af-8b7e-fc6157b33bad%40googlegroups.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/CAPmjWd22soh8N9YFxCn3e-OAUWjrc3VdT7F4FFYjFXZeiiF%3D%3Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd22soh8N9YFxCn3e-OAUWjrc3VdT7F4FFYjFXZeiiF%3D%3Dw%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:** ![Arinto\_Murdopo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arinto_murdopo/32/1779_2.png) [@Arinto\_Murdopo](https://discuss.elastic.co/u/Arinto_Murdopo)\
**Post date:** [February 11, 2014, 2:56am UTC](https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712/3 "2014-02-11T02:56:42Z")

</div>

Okay, noted.

Thanks and best regards,

Arinto

On 02/11/2014 10:42 AM, Nikolas Everett wrote:

> None of the builders are thread safe, no. I believe they are all  
> quite light weight though.
> 
> On Mon, Feb 10, 2014 at 9:25 PM, Arinto Murdopo \<[arinto@gmail.com](mailto:arinto@gmail.com)  
> [mailto:arinto@gmail.com](mailto:arinto@gmail.com)\> wrote:
> 
> ```
> Hi all,
> 
> Is QueryBuilder implementation thread-safe?
> I plan to use one static QueryBuilder class that is shared by
> several threads.
> 
> Best regards,
> 
> Arinto
> -- 
> 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%2Bunsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/e5bdb747-d412-42af-8b7e-fc6157b33bad%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> ```
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/wsdmFnLukMI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/wsdmFnLukMI/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAPmjWd22soh8N9YFxCn3e-OAUWjrc3VdT7F4FFYjFXZeiiF%3D%3Dw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd22soh8N9YFxCn3e-OAUWjrc3VdT7F4FFYjFXZeiiF%3D%3Dw%40mail.gmail.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/52F9916A.7010508%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/52F9916A.7010508%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:51am UTC](https://discuss.elastic.co/t/java-api-is-querybuiler-thread-safe/15712/4 "2017-07-06T01:51:16Z")

</div>


