# Changing tokenizer in Elasticsearch 2.2.0

**URL:** <https://discuss.elastic.co/t/changing-tokenizer-in-elasticsearch-2-2-0/48916>\
**Category:** Elasticsearch\
**Created:** [May 2, 2016, 5:27am UTC](https://discuss.elastic.co/t/changing-tokenizer-in-elasticsearch-2-2-0/48916 "2016-05-02T05:27:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinqkim1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jinqkim1](https://discuss.elastic.co/u/jinqkim1)\
**Post date:** [May 2, 2016, 5:27am UTC](https://discuss.elastic.co/t/changing-tokenizer-in-elasticsearch-2-2-0/48916/1 "2016-05-02T05:27:07Z")

</div>

Hi, I created an index on my cluster as below :

curl -XPUT [http://MYADDRESS](http://MYADDRESS):PORT/MYINDEX/?pretty -d '{  
"settings" : {  
"index":{  
"analysis":{  
"analyzer":{  
"korean":{  
"type":"custom",  
"tokenizer":"seunjeon\_default\_tokenizer"  
}  
},  
"tokenizer": {  
"seunjeon\_default\_tokenizer": {  
"type": "seunjeon\_tokenizer"  
}  
}  
}  
}  
},  
"mappings": {  
"MYTYPE" : {  
"properties" : {  
"f1" : {  
"type" : "integer"  
},  
"f2" : {  
"type" : "string"  
},  
"f3" : {  
"type" : "date",  
"format": "yyyy-MM-dd HH:mm:ss.SSS"  
},  
"f4" : {  
"type" : "date",  
"format": "yyyy-MM-dd HH:mm:ss.SSS"  
},  
"f5" : {  
"type" : "string"  
},  
"f6" : {  
"type" : "string"  
},  
"f7" : {  
"type" : "string"  
},  
"f8" : {  
"type" : "string",  
"analyzer": "korean"  
},  
"f9" : {  
"type" : "string",  
"analyzer": "korean"  
},  
"f10" : {  
"type" : "string"  
}  
}  
}  
}  
}'

I've done this successfully and inserted over 10 million documents.

What I wanted to do was change the tokenizer settings, so I closed my index, changed the settings, then opened the index as below :

curl -XPOST '[http://MYADDRESS](http://MYADDRESS):PORT/MYINDEX/\_close'

curl -XPUT '[http://MYADDRESS](http://MYADDRESS):PORT/MYINDEX/\_settings' -d '{  
"index":{  
"analysis":{  
"analyzer":{  
"korean":{  
"type":"custom",  
"tokenizer":"seunjeon\_default\_tokenizer"  
}  
},  
"tokenizer": {  
"seunjeon\_default\_tokenizer": {  
"type": "mecab\_ko\_standard\_tokenizer",  
**"index\_poses": ["UNK","EP","E","I","J","M","N","S","SL","SH","SN","V","VCP","XP","XS","XR"]**  
}  
}  
}  
}  
}'

curl -XPOST '[http://MYADDRESS](http://MYADDRESS):PORT/MYINDEX/\_open'

The problem is that now my cluster state is red with none of the shards allocated. Every time I hit "refresh" on head plugin, cluster seems to be randomly reassigning shards then unassigning them. Am I doing something wrong? It's been a little over an hour, and still none of the shards is allocated properly.

Also, cluster seems to be connecting and disconnecting.. Did I do something wrong?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 2, 2016, 5:32am UTC](https://discuss.elastic.co/t/changing-tokenizer-in-elasticsearch-2-2-0/48916/2 "2016-05-02T05:32:35Z")

</div>

Check your logs, there should be something stating the problem.

---

<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 5, 2017, 10:54pm UTC](https://discuss.elastic.co/t/changing-tokenizer-in-elasticsearch-2-2-0/48916/3 "2017-07-05T22:54:53Z")

</div>


