Error when trying to update the settings

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

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
Sent from the Elasticsearch Users mailing list archive at 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.
For more options, visit https://groups.google.com/groups/opt_out.