Index configuration in file possible?

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 :slight_smile:
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 :slight_smile:

Thanks for helping!

--Alexander

Hi,

Yes you can add the mapping in your configuration folder:

Cheers,

On 12 July 2011 11:02, Alexander Reelsen
alexander.reelsen@googlemail.comwrote:

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 :slight_smile:
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 :slight_smile:

Thanks for helping!

--Alexander

--
Alois Cochard

http://twitter.com/aloiscochard

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

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

Regards,

Dan

On Tue, Jul 12, 2011 at 3:02 AM, Alexander Reelsen <
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 :slight_smile:
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 :slight_smile:

Thanks for helping!

--Alexander

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 :wink:

Le 12 juil. 2011 à 11:02, Alexander Reelsen 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 :slight_smile:
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 :slight_smile:

Thanks for helping!

--Alexander

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 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 :wink:

Le 12 juil. 2011 à 11:02, Alexander Reelsen <
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 :slight_smile:
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 :slight_smile:

Thanks for helping!

--Alexander

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

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

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