# What is the multi-threading model for querying & indexing?

**URL:** <https://discuss.elastic.co/t/what-is-the-multi-threading-model-for-querying-indexing/5025>\
**Category:** Elasticsearch\
**Created:** [August 2, 2011, 8:49am UTC](https://discuss.elastic.co/t/what-is-the-multi-threading-model-for-querying-indexing/5025 "2011-08-02T08:49:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Sabou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_sabou/32/1472_2.png) [@Paul\_Sabou](https://discuss.elastic.co/u/Paul_Sabou)\
**Post date:** [August 2, 2011, 8:49am UTC](https://discuss.elastic.co/t/what-is-the-multi-threading-model-for-querying-indexing/5025/1 "2011-08-02T08:49:39Z")

</div>

Hi,

I searched for this information all over the site and the old/new  
mailing list and I could not find anything specific, explaining the  
multi threading model for the indexing/querying.

Could you guys provide more information on the multi-threading model  
of Elastic Search:  
(1) at query level : one thread/query/shard?  
(2) at indexing level : one thread/shard?

Thanks  
Paul.

---

<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:** [August 2, 2011, 10:33am UTC](https://discuss.elastic.co/t/what-is-the-multi-threading-model-for-querying-indexing/5025/2 "2011-08-02T10:33:29Z")

</div>

Yes, the threading model is one thread per shard (for search and indexing).  
Note, threading model is also important network systems, which is how do you  
handle threads while doing remote calls. elasticsearch, in this regards, is  
evented, which means there is no thread blocking waiting for responses from  
another node (For example, when doing index replication, or distributed  
search across several nodes).

On Tue, Aug 2, 2011 at 11:49 AM, Paul Sabou [paul.sabou@gmail.com](mailto:paul.sabou@gmail.com) wrote:

> Hi,
> 
> I searched for this information all over the site and the old/new  
> mailing list and I could not find anything specific, explaining the  
> multi threading model for the indexing/querying.
> 
> Could you guys provide more information on the multi-threading model  
> of Elastic Search:  
> (1) at query level : one thread/query/shard?  
> (2) at indexing level : one thread/shard?
> 
> Thanks  
> Paul.

---

<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:58am UTC](https://discuss.elastic.co/t/what-is-the-multi-threading-model-for-querying-indexing/5025/3 "2017-07-06T03:58:31Z")

</div>


