Reload synonym list

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

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

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/' -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 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 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