# Is there a way to have elasticsearch deny index requests on an index?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619>\
**Category:** Elasticsearch\
**Created:** [February 7, 2012, 12:12pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619 "2012-02-07T12:12:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ittai\_Zeidman](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@Ittai\_Zeidman](https://discuss.elastic.co/u/Ittai_Zeidman)\
**Post date:** [February 7, 2012, 12:12pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619/1 "2012-02-07T12:12:29Z")

</div>

Is there a way to have elasticsearch deny index requests on an index?  
The usecase for this is that when I want to update a mapping of a type, I'd  
like to deny incomming indexing requests while I'm reindexing into a new  
index.

Thanks

---

<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:** [February 7, 2012, 12:16pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619/2 "2012-02-07T12:16:24Z")

</div>

In upcoming 0.19, you will be able to set an index to be read only: [Set an index / indices to read only, or make the cluster read only · Issue #1573 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1573).

On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:

> Is there a way to have elasticsearch deny index requests on an index?  
> The usecase for this is that when I want to update a mapping of a type, I'd like to deny incomming indexing requests while I'm reindexing into a new index.
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 8, 2012, 6:53pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619/3 "2012-02-08T18:53:09Z")

</div>

Can this setting be set dynamically? Must the index be closed in order  
to reopen it as read-only? I am assuming the standard Lucene  
performance (greater concurrency) benefit applies.

I am thinking of using this feature in conjunction with index aliases.  
Write to a new index and then setting it to read only.

--  
Ivan

On Tue, Feb 7, 2012 at 4:16 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> In upcoming 0.19, you will be able to set an index to be read  
> only: [Set an index / indices to read only, or make the cluster read only · Issue #1573 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1573).
> 
> On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:
> 
> Is there a way to have elasticsearch deny index requests on an index?  
> The usecase for this is that when I want to update a mapping of a type, I'd  
> like to deny incomming indexing requests while I'm reindexing into a new  
> index.
> 
> Thanks

---

<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:** [February 9, 2012, 8:21am UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619/4 "2012-02-09T08:21:24Z")

</div>

Yes, you can set it dynamically using the index update settings API. If you have a closed index, you can first update its settings to be read only, and then open it. Don't understand the greater concurrency comment…, do you mean that if an index is read only, it will have better concurrency? in this case, the answer is no, ti will have the same.

On Wednesday, February 8, 2012 at 8:53 PM, Ivan Brusic wrote:

> Can this setting be set dynamically? Must the index be closed in order  
> to reopen it as read-only? I am assuming the standard Lucene  
> performance (greater concurrency) benefit applies.
> 
> I am thinking of using this feature in conjunction with index aliases.  
> Write to a new index and then setting it to read only.
> 
> --  
> Ivan
> 
> On Tue, Feb 7, 2012 at 4:16 AM, Shay Banon \<[kimchy@gmail.com](mailto:kimchy@gmail.com) ([mailto:kimchy@gmail.com](mailto:kimchy@gmail.com))\> wrote:
> 
> > In upcoming 0.19, you will be able to set an index to be read  
> > only: [Set an index / indices to read only, or make the cluster read only · Issue #1573 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1573).
> > 
> > On Tuesday, February 7, 2012 at 2:12 PM, Ittai Zeidman wrote:
> > 
> > Is there a way to have elasticsearch deny index requests on an index?  
> > The usecase for this is that when I want to update a mapping of a type, I'd  
> > like to deny incomming indexing requests while I'm reindexing into a new  
> > index.
> > 
> > Thanks

---

<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:39am UTC](https://discuss.elastic.co/t/is-there-a-way-to-have-elasticsearch-deny-index-requests-on-an-index/6619/5 "2017-07-06T03:39:59Z")

</div>


