# Overriding configuration by API

**URL:** <https://discuss.elastic.co/t/overriding-configuration-by-api/10720>\
**Category:** Elasticsearch\
**Created:** [February 13, 2013, 12:11am UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720 "2013-02-13T00:11:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasper\_van\_Wanrooy\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasper_van_wanrooy_c/32/2494_2.png) [@Jasper\_van\_Wanrooy\_C](https://discuss.elastic.co/u/Jasper_van_Wanrooy_C)\
**Post date:** [February 13, 2013, 12:11am UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/1 "2013-02-13T00:11:31Z")

</div>

Hi,

We have configured the analyzer settings for our ES node from the elasticsearch.yml. This works perfectly for us, since we had hardly any changes.  
Starting today we are using a lot of synonyms, which we want to be more flexible with. I can succesfully set the synonym settings using the \_settings api endpoint. However, when removing settings in the update, it doesn't work. Consider the following example: [https://gist.github.com/jappievw/f6ea0d7ace1df2201a70](https://gist.github.com/jappievw/f6ea0d7ace1df2201a70). I performed the following steps:  
Create a new index called "test".  
Update settings with contents of the test index with the contents of initial-settings.json  
The update is successfully applied, see settings-after-initial.json  
Now remove the second defined synonym of the index by updating the index "test" settings, with an updated config: settings-update.json  
The result after update is settings-after-update.json. The second synonym hasn't been removed.

I expected the second synonym to be removed. Few questions about this:  
Did I miss something in the documentation about removing configuration settings?  
Is it possible to update the settings at once for an index?  
How do others manage synonyms?

Thanks for your help,

Jasper

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 13, 2013, 10:40am UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/2 "2013-02-13T10:40:18Z")

</div>

Hiya

> We have configured the analyzer settings for our ES node from the  
> elasticsearch.yml. This works perfectly for us, since we had hardly  
> any changes.  
> Starting today we are using a lot of synonyms, which we want to be  
> more flexible with. I can succesfully set the synonym settings using  
> the \_settings api endpoint. However, when removing settings in the  
> update, it doesn't work. Consider the following example:  
> [https://gist.github.com/jappievw/f6ea0d7ace1df2201a70](https://gist.github.com/jappievw/f6ea0d7ace1df2201a70). I

Updating analysis settings is tricky to say the least. Generally  
changes are rejected.

One possibility is to store your synonyms in a file (which needs to be  
available on every node), then you can update the file (again on every  
node), close and reopen the index, and your synonyms list will have  
changed.

clint

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jasper\_van\_Wanrooy\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasper_van_wanrooy_c/32/2494_2.png) [@Jasper\_van\_Wanrooy\_C](https://discuss.elastic.co/u/Jasper_van_Wanrooy_C)\
**Post date:** [February 13, 2013, 12:37pm UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/3 "2013-02-13T12:37:25Z")

</div>

Thanks for your reply Clinton. Luckily we use puppet for the distrubution  
of the configuration files.  
There is no way to open and close all indices at once, right? That would  
make automation of these changes a breeze.

Thanks, Jasper

On Wednesday, February 13, 2013 11:40:18 AM UTC+1, Clinton Gormley wrote:

> Hiya
> 
> > We have configured the analyzer settings for our ES node from the  
> > elasticsearch.yml. This works perfectly for us, since we had hardly  
> > any changes.  
> > Starting today we are using a lot of synonyms, which we want to be  
> > more flexible with. I can succesfully set the synonym settings using  
> > the \_settings api endpoint. However, when removing settings in the  
> > update, it doesn't work. Consider the following example:  
> > [Updating index settings through API. · GitHub](https://gist.github.com/jappievw/f6ea0d7ace1df2201a70). I
> 
> Updating analysis settings is tricky to say the least. Generally  
> changes are rejected.
> 
> One possibility is to store your synonyms in a file (which needs to be  
> available on every node), then you can update the file (again on every  
> node), close and reopen the index, and your synonyms list will have  
> changed.
> 
> clint

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 13, 2013, 1:56pm UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/4 "2013-02-13T13:56:25Z")

</div>

On Wed, 2013-02-13 at 04:37 -0800, Jasper van Wanrooy wrote:

> Thanks for your reply Clinton. Luckily we use puppet for the  
> distrubution of the configuration files.  
> There is no way to open and close all indices at once, right? That  
> would make automation of these changes a breeze.

No, you have to close them by name. Also, reopening an index can be  
time consuming as the index needs to be recovered from disk. I'd do a  
flush before closing

clint

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Jasper\_van\_Wanrooy\_C](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasper_van_wanrooy_c/32/2494_2.png) [@Jasper\_van\_Wanrooy\_C](https://discuss.elastic.co/u/Jasper_van_Wanrooy_C)\
**Post date:** [February 13, 2013, 7:17pm UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/5 "2013-02-13T19:17:21Z")

</div>

> No, you have to close them by name. Also, reopening an index can be  
> time consuming as the index needs to be recovered from disk. I'd do a  
> flush before closing

Ok, clear. Thanks for the explanation!

Jasper

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:51am UTC](https://discuss.elastic.co/t/overriding-configuration-by-api/10720/6 "2017-07-06T02:51:33Z")

</div>


