# Does Elastic Support Chinese?

**URL:** <https://discuss.elastic.co/t/does-elastic-support-chinese/47181>\
**Category:** Elasticsearch\
**Created:** [April 13, 2016, 2:19am UTC](https://discuss.elastic.co/t/does-elastic-support-chinese/47181 "2016-04-13T02:19:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David.Song](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@David.Song](https://discuss.elastic.co/u/David.Song)\
**Post date:** [April 13, 2016, 2:19am UTC](https://discuss.elastic.co/t/does-elastic-support-chinese/47181/1 "2016-04-13T02:19:15Z")

</div>

I am a Chinese guy, I use Elastic test my application and I have some questions.  
My Question is :  
curl -X PUT 'localhost:9200/music?pretty' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/\_mapping?pretty' -d '{"song" : {"properties" : { "name" : { "type" : "string" },"suggest" : { "type" : "completion", "analyzer" : "simple","search\_analyzer" : "simple", "payloads" : true }}}}' \> /dev/null

curl -X PUT 'localhost:9200/music/song/11?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["美"], "payload" : { "artistId" : 1 }, "weight" : 3800}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/10?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["发"], "payload" : { "artistId" : 2 }, "weight" : 4000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/12?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["护发"], "payload" : { "artistId" : 3 }, "weight" : 4100}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/13?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["脱发"], "payload" : { "artistId" : 4 }, "weight" : 2800}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/14?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["头发保养"], "payload" : { "artistId" : 5 }, "weight" : 5100}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/15?refresh=true' -d '{"name" : "美发","suggest" : {"output": "美发", "input": ["头发养护"], "payload" : { "artistId" : 6 }, "weight" : 5100}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/16?refresh=true' -d '{"name" : "美发name","suggest" : {"output": "美发out", "input": ["美发"], "payload" : { "artistId" : 7 }, "weight" : 100}}' \> /dev/null

curl -X PUT 'localhost:9200/music/song/17?refresh=true' -d '{"name" : "美体","suggest" : {"output": "美体", "input": ["美"], "payload" : { "artistId" : 8 }, "weight" : 3400}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/18?refresh=true' -d '{"name" : "美体","suggest" : {"output": "美体", "input": ["体"], "payload" : { "artistId" : 9 }, "weight" : 4000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/19?refresh=true' -d '{"name" : "美体","suggest" : {"output": "美体", "input": ["塑形"], "payload" : { "artistId" : 11 }, "weight" : 8000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/20?refresh=true' -d '{"name" : "美体","suggest" : {"output": "美体", "input": ["塑身"], "payload" : { "artistId" : 12 }, "weight" : 8000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/21?refresh=true' -d '{"name" : "美体name","suggest" : {"output": "美体out", "input": ["美体"], "payload" : { "artistId" : 13 }, "weight" : 100}}' \> /dev/null

curl -X PUT 'localhost:9200/music/song/22?refresh=true' -d '{"name" : "美食","suggest" : {"output": "美食", "input": ["美"], "payload" : { "artistId" : 14 }, "weight" : 2600}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/23?refresh=true' -d '{"name" : "美食","suggest" : {"output": "美食", "input": ["食"], "payload" : { "artistId" : 15 }, "weight" : 6000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/24?refresh=true' -d '{"name" : "美食","suggest" : {"output": "美食", "input": ["探店"], "payload" : { "artistId" : 16 }, "weight" : 4400}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/25?refresh=true' -d '{"name" : "美食","suggest" : {"output": "美食", "input": ["吃货"], "payload" : { "artistId" : 17 }, "weight" : 4000}}' \> /dev/null  
curl -X PUT 'localhost:9200/music/song/26?refresh=true' -d '{"name" : "美食name","suggest" : {"output": "美食out", "input": ["美食"], "payload" : { "artistId" : 18 }, "weight" : 100}}' \> /dev/null

curl -X POST 'localhost:9200/music/\_suggest?pretty' -d '{ "song-suggest" : {"text" : "美","completion" : {"field" : "suggest", "fuzzy":true, "size":10 }}}'

then I input "美", i want to get "美食","美体","美发" only， but I also get "美食out", "美体out" and "美发out".  
So my question is that if the input match the prefix "美"， so the input can match "美" ，"美体", "美食"， "美发" or it is a completed match ?  
and how I can get my result,? I only want to get "美食","美体","美发"。 I do not want the "美食out", "美体out" and "美发out".

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 14, 2016, 1:56pm UTC](https://discuss.elastic.co/t/does-elastic-support-chinese/47181/2 "2016-04-14T13:56:36Z")

</div>

Hey,

The [simple analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-simple-analyzer.html) does not know about chinese, but there is a special [chinese one](https://www.elastic.co/guide/en/elasticsearch/guide/current/language-intro.html) and the [ICU](https://www.elastic.co/guide/en/elasticsearch/guide/current/icu-tokenizer.html) plugin that might helpful - that needs to be installed in addition.

--Alex

---

<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:59pm UTC](https://discuss.elastic.co/t/does-elastic-support-chinese/47181/3 "2017-07-05T22:59:13Z")

</div>


