# Index configuration in file possible?

**URL:** <https://discuss.elastic.co/t/index-configuration-in-file-possible/4836>\
**Category:** Elasticsearch\
**Created:** [July 12, 2011, 9:02am UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836 "2011-07-12T09:02:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Reelsen](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Alexander\_Reelsen](https://discuss.elastic.co/u/Alexander_Reelsen)\
**Post date:** [July 12, 2011, 9:02am UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/1 "2011-07-12T09:02:10Z")

</div>

Hi there,

I just found out, that it is possible to mappings as files in the  
filesystem. I like that feature very much, and the operations  
department even more 🙂  
Is there any possibility to store the index configuration (which is  
done on index creation) as well on the filesystem? I did not find any  
documentation, or more likely searched wrong.

Is this a) possible and b) a good idea except that I like it 🙂

Thanks for helping!

--Alexander

---

<div class="post-metadata">

**Author:** ![Alois\_Cochard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alois_cochard/32/3176_2.png) [@Alois\_Cochard](https://discuss.elastic.co/u/Alois_Cochard)\
**Post date:** [July 12, 2011, 9:08am UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/2 "2011-07-12T09:08:59Z")

</div>

Hi,

Yes you can add the mapping in your configuration folder:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Cheers,

On 12 July 2011 11:02, Alexander Reelsen  
[alexander.reelsen@googlemail.com](mailto:alexander.reelsen@googlemail.com)wrote:

> Hi there,
> 
> I just found out, that it is possible to mappings as files in the  
> filesystem. I like that feature very much, and the operations  
> department even more 🙂  
> Is there any possibility to store the index configuration (which is  
> done on index creation) as well on the filesystem? I did not find any  
> documentation, or more likely searched wrong.
> 
> Is this a) possible and b) a good idea except that I like it 🙂
> 
> Thanks for helping!
> 
> --Alexander

--  
_Alois Cochard_

> **[Alois Cochard's Blog](http://aloiscochard.blogspot.com)**
>
> Computer Development

[http://twitter.com/aloiscochard](http://twitter.com/aloiscochard)

---

<div class="post-metadata">

**Author:** ![Alexander\_Reelsen](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Alexander\_Reelsen](https://discuss.elastic.co/u/Alexander_Reelsen)\
**Post date:** [July 12, 2011, 12:09pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/3 "2011-07-12T12:09:28Z")

</div>

Hi,

sorry for not being clear. I know this works. I meant whether the same  
is possible for index configuration (analyzers etc) and not only for  
the mappings.

--Alexander

---

<div class="post-metadata">

**Author:** ![danoyoung](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danoyoung](https://discuss.elastic.co/u/danoyoung)\
**Post date:** [July 12, 2011, 12:30pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/4 "2011-07-12T12:30:47Z")

</div>

you can put your index settings in the elasticsearch.yml in the config  
directory.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Regards,

Dan

On Tue, Jul 12, 2011 at 3:02 AM, Alexander Reelsen \<  
[alexander.reelsen@googlemail.com](mailto:alexander.reelsen@googlemail.com)\> wrote:

> Hi there,
> 
> I just found out, that it is possible to mappings as files in the  
> filesystem. I like that feature very much, and the operations  
> department even more 🙂  
> Is there any possibility to store the index configuration (which is  
> done on index creation) as well on the filesystem? I did not find any  
> documentation, or more likely searched wrong.
> 
> Is this a) possible and b) a good idea except that I like it 🙂
> 
> Thanks for helping!
> 
> --Alexander

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 12, 2011, 12:49pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/5 "2011-07-12T12:49:58Z")

</div>

To answer to point b)  
Not sure that is a best practice. I think (not sure about that) that if you put settings in files, you will have to copy it on each node.  
Sending settings through curl will copy settings on each node.

Correct me if I'm wrong...

David 😉

Le 12 juil. 2011 à 11:02, Alexander Reelsen [alexander.reelsen@googlemail.com](mailto:alexander.reelsen@googlemail.com) a écrit :

> Hi there,
> 
> I just found out, that it is possible to mappings as files in the  
> filesystem. I like that feature very much, and the operations  
> department even more 🙂  
> Is there any possibility to store the index configuration (which is  
> done on index creation) as well on the filesystem? I did not find any  
> documentation, or more likely searched wrong.
> 
> Is this a) possible and b) a good idea except that I like it 🙂
> 
> Thanks for helping!
> 
> --Alexander

---

<div class="post-metadata">

**Author:** ![danoyoung](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danoyoung](https://discuss.elastic.co/u/danoyoung)\
**Post date:** [July 12, 2011, 12:53pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/6 "2011-07-12T12:53:56Z")

</div>

This is true. we just load ours up from a json file in our rails app when  
we need indexes with different shard/replica settings. And then we have a  
default setting that is in the elasticsearch.yml file that is used when an  
index is created w/o specified settings.

Regards,

Dan

On Tue, Jul 12, 2011 at 6:49 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> To answer to point b)  
> Not sure that is a best practice. I think (not sure about that) that if you  
> put settings in files, you will have to copy it on each node.  
> Sending settings through curl will copy settings on each node.
> 
> Correct me if I'm wrong...
> 
> David 😉
> 
> Le 12 juil. 2011 à 11:02, Alexander Reelsen \<  
> [alexander.reelsen@googlemail.com](mailto:alexander.reelsen@googlemail.com)\> a écrit :
> 
> > Hi there,
> > 
> > I just found out, that it is possible to mappings as files in the  
> > filesystem. I like that feature very much, and the operations  
> > department even more 🙂  
> > Is there any possibility to store the index configuration (which is  
> > done on index creation) as well on the filesystem? I did not find any  
> > documentation, or more likely searched wrong.
> > 
> > Is this a) possible and b) a good idea except that I like it 🙂
> > 
> > Thanks for helping!
> > 
> > --Alexander

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 12, 2011, 12:54pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/7 "2011-07-12T12:54:43Z")

</div>

On Tue, 2011-07-12 at 14:49 +0200, David Pilato wrote:

> To answer to point b)  
> Not sure that is a best practice. I think (not sure about that) that if you put settings in files, you will have to copy it on each node.  
> Sending settings through curl will copy settings on each node.
> 
> Correct me if I'm wrong...

Absolutely correct.

The danger with using config files is that you need to be sure that all  
your nodes have the same config.

To my mind, much easier to do it in your application via the API.

clint

---

<div class="post-metadata">

**Author:** ![Alexander\_Reelsen](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Alexander\_Reelsen](https://discuss.elastic.co/u/Alexander_Reelsen)\
**Post date:** [July 12, 2011, 1:14pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/8 "2011-07-12T13:14:15Z")

</div>

Hi there,

if you are starting with a single node it is still somewhat handy to  
have all configuration loaded on startup instead of calling the HTTP  
API before being able to pull data in.  
In case of a clustered setup you are absolutely right of course.

--Alexander

---

<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:** [July 12, 2011, 4:59pm UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/9 "2011-07-12T16:59:07Z")

</div>

Heya,

Regarding index level settings, you can put the settings in the elasticsearch main configuration, but then it will apply to all indices created. You can put mappings per index (or across all indices), in the file system, but not index settings. Its a missing feature. Though I prefer people will configure elasticsearch using an API to make it simpler when they move to a distributed environment, you can open a feature to allow to specify index level settings in the file system, shouldn't be hard to implement.

On Tuesday, July 12, 2011 at 4:14 PM, Alexander Reelsen wrote:

> Hi there,
> 
> if you are starting with a single node it is still somewhat handy to  
> have all configuration loaded on startup instead of calling the HTTP  
> API before being able to pull data in.  
> In case of a clustered setup you are absolutely right of course.
> 
> --Alexander

---

<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:00am UTC](https://discuss.elastic.co/t/index-configuration-in-file-possible/4836/10 "2017-07-06T04:00:57Z")

</div>


