# Sub-Indexes and Locking

**URL:** <https://discuss.elastic.co/t/sub-indexes-and-locking/3800>\
**Category:** Elasticsearch\
**Created:** [January 18, 2011, 10:30am UTC](https://discuss.elastic.co/t/sub-indexes-and-locking/3800 "2011-01-18T10:30:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [January 18, 2011, 10:30am UTC](https://discuss.elastic.co/t/sub-indexes-and-locking/3800/1 "2011-01-18T10:30:26Z")

</div>

Hi Shay,

In compass I could index my sub-indexes in parallel because locking  
was on each sub-index separately. This greatly increased my indexing  
speed. Is it possible to do the same thing in ElasticSearch? Can you  
explain the locking mechanism in ElasticSearch or point me to the  
relevant docs.

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:** [January 18, 2011, 6:24pm UTC](https://discuss.elastic.co/t/sub-indexes-and-locking/3800/2 "2011-01-18T18:24:28Z")

</div>

Elasticsearch works a bit differently, and in similar manner to the bulk update processor in last Compass version. It has a single locked index through the lifecycle of a shard, and index operations are done on it concurrently.  
On Tuesday, January 18, 2011 at 12:30 PM, dalesrob wrote:

> Hi Shay,
> 
> In compass I could index my sub-indexes in parallel because locking  
> was on each sub-index separately. This greatly increased my indexing  
> speed. Is it possible to do the same thing in Elasticsearch? Can you  
> explain the locking mechanism in Elasticsearch or point me to the  
> relevant docs.
> 
> thanks,
> 
> 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, 4:13am UTC](https://discuss.elastic.co/t/sub-indexes-and-locking/3800/3 "2017-07-06T04:13:36Z")

</div>

Closed on July 6, 2017, 4:13am UTC


