# Error when trying to update the settings

**URL:** <https://discuss.elastic.co/t/error-when-trying-to-update-the-settings/14233>\
**Category:** Elasticsearch\
**Created:** [November 3, 2013, 11:17am UTC](https://discuss.elastic.co/t/error-when-trying-to-update-the-settings/14233 "2013-11-03T11:17:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rchod](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rchod/32/2008_2.png) [@rchod](https://discuss.elastic.co/u/rchod)\
**Post date:** [November 3, 2013, 11:17am UTC](https://discuss.elastic.co/t/error-when-trying-to-update-the-settings/14233/1 "2013-11-03T11:17:37Z")

</div>

hi, i try to execute this commands via a bash script but i get these errors:

#!/bin/bash

curl -XPOST 'localhost:9200/my\_index/\_close'

curl -XPUT 'localhost:9200/my\_index/\_settings' -d '{  
"analysis": {  
"analyzer": {  
"ar\_analyzer": {  
"tokenizer": "standard",  
"filter" : ["standard", "lowercase", "synonym", "ar\_stemmer"]  
},  
"fr\_analyzer": {  
"tokenizer": "standard",  
"filter" : ["standard", "lowercase", "synonym", "fr\_stemmer"]  
}  
},  
"filter" : {  
"ar\_stemmer" : {  
"type" : "stemmer",  
"name" : "arabic"  
},  
"fr\_stemmer" : {  
"type" : "stemmer",  
"name" : "french"  
},  
"synonym" : {  
"type" : "synonym",  
"synonyms\_path" : "synonyms.txt"  
}  
}  
}  
}'

curl -XPOST 'localhost:9200/my\_index/\_open'

------- errors:

{"error":"IndexPrimaryShardNotAllocatedException[[my\_index] primary not allocated post api]","status":409}{"error":"ElasticSearchIllegalArgumentException[Can't update non dynamic settings[[index.analysis.filter.ar\_stemmer.name , index.analysis.analyzer.fr\_analyzer.filter.3, index.analysis.filter.synonym.type, index.analysis.analyzer.ar\_analyzer.filter.0, index.analysis.analyzer.fr\_analyzer.filter.0, index.analysis.analyzer.ar\_analyzer.filter.1, index.analysis.analyzer.fr\_analyzer.filter.2, index.analysis.analyzer.fr\_analyzer.filter.1, index.analysis.analyzer.ar\_analyzer.filter.2, index.analysis.analyzer.ar\_analyzer.filter.3, index.analysis.filter.ar\_stemmer.type, index.analysis.filter.fr\_stemmer.name , index.analysis.analyzer.ar\_analyzer.tokenizer, index.analysis.filter.fr\_stemmer.type, index.analysis.analyzer.fr\_analyzer.tokenizer, index.analysis.filter.synonym.synonyms\_path]] for open indices[[my\_index]]]","status":400}

help please !!

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [November 4, 2013, 1:01pm UTC](https://discuss.elastic.co/t/error-when-trying-to-update-the-settings/14233/2 "2013-11-04T13:01:51Z")

</div>

Hi Rachid,

I think the problem is with your setting. You can't set/change the name of  
a tokenizer, it is derived from the node it's under.

Cheers,  
Boaz

On Sunday, November 3, 2013 12:17:37 PM UTC+1, Rachid rchod wrote:

> hi, i try to execute this commands via a bash script but i get these  
> errors:
> 
> #!/bin/bash
> 
> curl -XPOST 'localhost:9200/my\_index/\_close'
> 
> curl -XPUT 'localhost:9200/my\_index/\_settings' -d '{  
> "analysis": {  
> "analyzer": {  
> "ar\_analyzer": {  
> "tokenizer": "standard",  
> "filter" : ["standard", "lowercase", "synonym", "ar\_stemmer"]  
> },  
> "fr\_analyzer": {  
> "tokenizer": "standard",  
> "filter" : ["standard", "lowercase", "synonym", "fr\_stemmer"]  
> }  
> },  
> "filter" : {  
> "ar\_stemmer" : {  
> "type" : "stemmer",  
> "name" : "arabic"  
> },  
> "fr\_stemmer" : {  
> "type" : "stemmer",  
> "name" : "french"  
> },  
> "synonym" : {  
> "type" : "synonym",  
> "synonyms\_path" : "synonyms.txt"  
> }  
> }  
> }  
> }'
> 
> curl -XPOST 'localhost:9200/my\_index/\_open'
> 
> ------- errors:
> 
> {"error":"IndexPrimaryShardNotAllocatedException[[my\_index] primary not  
> allocated post  
> api]","status":409}{"error":"ElasticSearchIllegalArgumentException[Can't  
> update non dynamic settings[[index.analysis.filter.ar\_stemmer.name ,  
> index.analysis.analyzer.fr\_analyzer.filter.3,  
> index.analysis.filter.synonym.type,  
> index.analysis.analyzer.ar\_analyzer.filter.0,  
> index.analysis.analyzer.fr\_analyzer.filter.0,  
> index.analysis.analyzer.ar\_analyzer.filter.1,  
> index.analysis.analyzer.fr\_analyzer.filter.2,  
> index.analysis.analyzer.fr\_analyzer.filter.1,  
> index.analysis.analyzer.ar\_analyzer.filter.2,  
> index.analysis.analyzer.ar\_analyzer.filter.3,  
> index.analysis.filter.ar\_stemmer.type,  
> index.analysis.filter.fr\_stemmer.name  
> , index.analysis.analyzer.ar\_analyzer.tokenizer,  
> index.analysis.filter.fr\_stemmer.type,  
> index.analysis.analyzer.fr\_analyzer.tokenizer,  
> index.analysis.filter.synonym.synonyms\_path]] for open  
> indices[[my\_index]]]","status":400}
> 
> help please !!
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/error-when-trying-to-update-the-settings-tp4043674.html](http://elasticsearch-users.115913.n3.nabble.com/error-when-trying-to-update-the-settings-tp4043674.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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:09am UTC](https://discuss.elastic.co/t/error-when-trying-to-update-the-settings/14233/3 "2017-07-06T02:09:03Z")

</div>


