# Open index in readOnly mode

**URL:** <https://discuss.elastic.co/t/open-index-in-readonly-mode/5794>\
**Category:** Elasticsearch\
**Created:** [November 7, 2011, 12:56pm UTC](https://discuss.elastic.co/t/open-index-in-readonly-mode/5794 "2011-11-07T12:56:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruflin\_2](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@ruflin\_2](https://discuss.elastic.co/u/ruflin_2)\
**Post date:** [November 7, 2011, 12:56pm UTC](https://discuss.elastic.co/t/open-index-in-readonly-mode/5794/1 "2011-11-07T12:56:52Z")

</div>

Is there any possibility to set an index to read only? I found that the  
Lucene IndexReader supports opening an index in read only mode.It would be  
nice if an index on ES could be set to read only and from this time on, all  
readers open the index in read only mode.

[http://lucene.apache.org/java/3\_0\_1/api/core/org/apache/lucene/index/IndexReader.html](http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/index/IndexReader.html)

---

<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:** [November 9, 2011, 6:51am UTC](https://discuss.elastic.co/t/open-index-in-readonly-mode/5794/2 "2011-11-09T06:51:51Z")

</div>

The ability to open a Lucene index reader in read only mode does not relate  
to an index being read only (actually, it is opened in read only mode by  
elasticsearch, since updates are done through the IndexWriter). But, the  
feature make sense, open an issue?

On Mon, Nov 7, 2011 at 2:56 PM, ruflin [ruflin@gmail.com](mailto:ruflin@gmail.com) wrote:

> Is there any possibility to set an index to read only? I found that the  
> Lucene IndexReader supports opening an index in read only mode.It would be  
> nice if an index on ES could be set to read only and from this time on, all  
> readers open the index in read only mode.
> 
> [IndexReader (Lucene 3.0.3 API)](http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/index/IndexReader.html)

---

<div class="post-metadata">

**Author:** ![ruflin\_2](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@ruflin\_2](https://discuss.elastic.co/u/ruflin_2)\
**Post date:** [November 10, 2011, 8:32pm UTC](https://discuss.elastic.co/t/open-index-in-readonly-mode/5794/3 "2011-11-10T20:32:09Z")

</div>

Good to know. I just opened an  
issue: [https://github.com/elasticsearch/elasticsearch/issues/1452](https://github.com/elasticsearch/elasticsearch/issues/1452)

---

<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:49am UTC](https://discuss.elastic.co/t/open-index-in-readonly-mode/5794/4 "2017-07-06T03:49:06Z")

</div>


