# Reload synonym list

**URL:** <https://discuss.elastic.co/t/reload-synonym-list/4966>\
**Category:** Elasticsearch\
**Created:** [July 26, 2011, 8:25pm UTC](https://discuss.elastic.co/t/reload-synonym-list/4966 "2011-07-26T20:25:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 26, 2011, 8:25pm UTC](https://discuss.elastic.co/t/reload-synonym-list/4966/1 "2011-07-26T20:25:36Z")

</div>

Hey,  
Don't think so, but is it possible to reload the synonym list  
without restarting the cluster? The indices using this would need to  
be rebuilt for things to correctly take effect.

Perhaps it would make more sense to add a new analyzer for the new  
synonym list and create a new index using that analyzer, rebuild the  
data into there and swap an alias? Along these lines, what API is used  
to dynamically add a new analyzer? Maybe I'm not looking in correct  
location, but I can't find any examples.

Thanks!  
Paul

---

<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 27, 2011, 4:41am UTC](https://discuss.elastic.co/t/reload-synonym-list/4966/2 "2011-07-27T04:41:19Z")

</div>

Hey,

The only way to reload the synonym file is by closing and opening the  
index. Adding new analyzers requires similar mechanism, where you close the  
index, update its settings with the new analyzer, and then open it again.

-shay.banon

On Tue, Jul 26, 2011 at 11:25 PM, Paul [ppearcy@gmail.com](mailto:ppearcy@gmail.com) wrote:

> Hey,  
> Don't think so, but is it possible to reload the synonym list  
> without restarting the cluster? The indices using this would need to  
> be rebuilt for things to correctly take effect.
> 
> Perhaps it would make more sense to add a new analyzer for the new  
> synonym list and create a new index using that analyzer, rebuild the  
> data into there and swap an alias? Along these lines, what API is used  
> to dynamically add a new analyzer? Maybe I'm not looking in correct  
> location, but I can't find any examples.
> 
> Thanks!  
> Paul

---

<div class="post-metadata">

**Author:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 27, 2011, 6:40am UTC](https://discuss.elastic.co/t/reload-synonym-list/4966/3 "2011-07-27T06:40:30Z")

</div>

Ah, great to know, thanks! That will be very helpful.

I did some digging and while I couldn't find anything in the docs, I  
managed to stumble across an example somebody had posted on how to  
dynamically an analyzer during index creation. For those interested,  
it looks like this:

curl -XPUT '[http://localhost:9200/twitter/](http://localhost:9200/twitter/)' -d '{  
"settings" : {  
"index" : {  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 1,  
"analysis":{  
"analyzer":{  
"really\_verbatim":{  
"type":"custom",  
"tokenizer":"whitespace",  
"filter":[  
"really\_verbatim\_filter"  
]  
}  
},  
"filter":{  
"really\_verbatim\_filter":{  
"type":"word\_delimiter",  
"generate\_word\_parts":"0",  
"generate\_number\_parts":"0",  
"catenate\_words":"0",  
"catenate\_numbers":"0",  
"catenate\_all":"0",  
"preserve\_original":"1",  
"split\_on\_case\_change":"0",  
"split\_on\_numerics":"0",  
"stem\_english\_possessive":"0"  
}  
}  
}  
}  
}  
}'

On Jul 26, 10:41 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Hey,
> 
> The only way to reload the synonym file is by closing and opening the  
> index. Adding new analyzers requires similar mechanism, where you close the  
> index, update its settings with the new analyzer, and then open it again.
> 
> -shay.banon
> 
> On Tue, Jul 26, 2011 at 11:25 PM, Paul [ppea...@gmail.com](mailto:ppea...@gmail.com) wrote:
> 
> > Hey,  
> > Don't think so, but is it possible to reload the synonym list  
> > without restarting the cluster? The indices using this would need to  
> > be rebuilt for things to correctly take effect.
> 
> > Perhaps it would make more sense to add a new analyzer for the new  
> > synonym list and create a new index using that analyzer, rebuild the  
> > data into there and swap an alias? Along these lines, what API is used  
> > to dynamically add a new analyzer? Maybe I'm not looking in correct  
> > location, but I can't find any examples.
> 
> > Thanks!  
> > Paul

---

<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:59am UTC](https://discuss.elastic.co/t/reload-synonym-list/4966/4 "2017-07-06T03:59:06Z")

</div>


