# 无法搜索韩语单词

**URL:** https://meta.discourse.org/t/korean-words-cant-be-searched/88410
**Category:** Support
**Created:** [2018 年5 月 24 日 21:09 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410 "2018-05-24T21:09:14Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 24 日 21:09 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/1 "2018-05-24T21:09:14Z")

</div>

English words can be searched properly  
but the forum doesn’t recognize Korean and Chinese search terms at all

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2018 年5 月 24 日 21:11 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/2 "2018-05-24T21:11:43Z")

</div>

Did you install using the correct database locale / language?

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 24 日 21:33 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/3 "2018-05-24T21:33:23Z")

</div>

yes I did. I installed as Korean language.

should I turn on ‘search tokenize chinese japanese korean’ this feature??

---

<div class="post-metadata">

### 作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### 发布日期： [2018 年5 月 24 日 22:03 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/4 "2018-05-24T22:03:03Z")

</div>

I had someone contact me about this recently. I wasn’t sure which locale to use for Chinese, as I don’t know how the Postgres locales map to the various Chinese dialects. Is there some way to know which to use?

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 24 日 22:32 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/5 "2018-05-24T22:32:07Z")

</div>

> [@k11](#):
>
> should I turn on ‘search tokenize chinese japanese korean’

should I turn on ‘search tokenize chinese japanese korean’ ???

please help me.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2018 年5 月 24 日 22:37 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/6 "2018-05-24T22:37:25Z")

</div>

Probably, give it a shot and see what happens.

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 24 日 23:07 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/7 "2018-05-24T23:07:46Z")

</div>

turned on it but still can’t search any Korean and Chinese words..

---

<div class="post-metadata">

### 作者： ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### 发布日期： [2018 年5 月 25 日 00:31 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/8 "2018-05-25T00:31:32Z")

</div>

I don’t know for certain, but I have a feeling the tokenize happens between raw → cooked.

If you rebake a post with the Korean or Chinese words, does that post then show up in Search?

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 25 日 00:49 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/9 "2018-05-25T00:49:28Z")

</div>

I posted a new topic and searched korean words but still nothing shown up in search result 😕

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2018 年5 月 25 日 01:04 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/10 "2018-05-25T01:04:01Z")

</div>

Not sure, maybe @fantasticfears would know?

---

<div class="post-metadata">

### 作者： ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### 发布日期： [2018 年5 月 25 日 12:33 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/11 "2018-05-25T12:33:20Z")

</div>

You don’t have to change Postgres locale but your default\_locale should be `zh_CN` and `zh_TW`. @k11 you could try `search tokenize chinese japanese korean` but the dictionaries are limited for Korean.

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 25 日 12:52 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/12 "2018-05-25T12:52:18Z")

</div>

I already turned on ‘search tokenize chinese japanese korean’ like 12 hours ago  
but site cannot search any korean words..

Should I reboot my server or do something else?

---

<div class="post-metadata">

### 作者： ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### 发布日期： [2018 年5 月 25 日 13:10 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/13 "2018-05-25T13:10:40Z")

</div>

Dont you have to recook your posts to update the full text index?

If i remember, getting Chinese working is nontrivial. There are a whole bunch of settings required for CJK support. For example, you’ll need to turn down the text entropy limit, and turn off prettify.

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 25 日 14:17 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/14 "2018-05-25T14:17:37Z")

</div>

Can you help me set up Korean as well?

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 25 日 22:05 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/15 "2018-05-25T22:05:09Z")

</div>

still couldn’t solve this issue 😕  
can’t search any korean words..  
anyone can help?

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2018 年5 月 25 日 22:53 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/16 "2018-05-25T22:53:36Z")

</div>

Try creating a new post, does it show up in search?

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 25 日 23:19 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/17 "2018-05-25T23:19:44Z")

</div>

new post also not show up in search result..  
only english can..

---

<div class="post-metadata">

### 作者： ![misaka4e21](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@misaka4e21](https://meta.discourse.org/u/misaka4e21)
#### 发布日期： [2018 年5 月 25 日 23:48 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/18 "2018-05-25T23:48:08Z")

</div>

> <https://github.com/discourse/discourse/blob/main/lib/search.rb#L51>

Specific tokenizers are needed for Japanese and Korean to work. (Maybe Korean doesn’t need one?)

It seems that Discourse relies on spaces between words to perform a success search. Chinese and Japanese users don’t add a space between two words, therefore a tokenizer is required to split a sentence into words. Though I don’t understand Korean (and Japanese), there are inter-word spaces on Korean Wikipedia, however.

CppJiebaRb, the tokenizer designed for Chinese only, has been used for Chinese, Japanese and Korean in Discourse. It segments any Japanese or Korean sentence into an array of each character but not words which are expected.

---

<div class="post-metadata">

### 作者： ![k11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@k11](https://meta.discourse.org/u/k11)
#### 发布日期： [2018 年5 月 26 日 00:59 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/19 "2018-05-26T00:59:19Z")

</div>

thanks for comment.  
But what should I do for korean search?  
sorry I’m very new to SSH command and not sure what you meant me to do..

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2018 年5 月 26 日 01:11 UTC](https://meta.discourse.org/t/korean-words-cant-be-searched/88410/20 "2018-05-26T01:11:00Z")

</div>

Nice detective work, looks like it is a bit complicated:

> **[Word spacing - Korean Wiki Project](https://www.koreanwikiproject.com/wiki/Word_spacing)**

@k11 the problem is search relies on having seperate words in the index.

So for example if we do not try to inject spaces when we type 공을 치다 you will not be able to find 을.

Curious when you use search on this site does search in work correctly for this topic?

[下一页](https://meta.discourse.org/t/korean-words-cant-be-searched/88410.md?page=2)
