# I don't know why do not match the keyword are searched

**URL:** <https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886>\
**Category:** Elasticsearch\
**Created:** [February 12, 2020, 3:15am UTC](https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886 "2020-02-12T03:15:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuzes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fuzes/32/46820_2.png) [@fuzes](https://discuss.elastic.co/u/fuzes)\
**Post date:** [February 12, 2020, 3:15am UTC](https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886/1 "2020-02-12T03:15:23Z")

</div>

following is my mapping

```
"tags" : {
          "properties" : {
            "zh-TW" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },

```

and when i request query like this

```
{
  "query": {
		"multi_match": {
			"query": "口罩",
			"fields":[
				"tags",
				"tags.zh-TW",
				"tags.zh-CN"
			]
		}
	}
}

```

i really didn't know why followings are searched

"zh-CN": [  
null,  
"自行车",  
"汉江",  
"蚕室",  
"首尔",  
"广渡口",  
"广渡口公园",  
"广渡口自行车公园",  
"景点"  
],  
"zh-TW": [  
"自行車",  
"漢江",  
"漢江腳踏車",  
"美景",  
"蠶室",  
"首爾",  
"廣渡口",  
"廣渡口公園",  
"廣渡口自行車公園",  
"景點",  
"首爾旅行",  
"首爾腳踏車之旅"  
],

I can't find '口罩' in tags!! why they are searched??  
it makes me crazy... please help me

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 12, 2020, 6:22am UTC](https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886/2 "2020-02-12T06:22:58Z")

</div>

Have a look at analyze API. It will tell you how your text is actually indexed.

If you want exact match, you can search in the `tags.zh-TW.keyword` field.

---

<div class="post-metadata">

**Author:** ![fuzes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fuzes/32/46820_2.png) [@fuzes](https://discuss.elastic.co/u/fuzes)\
**Post date:** [February 13, 2020, 6:55am UTC](https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886/3 "2020-02-13T06:55:30Z")

</div>

thank you for your reply. when i analyze "口罩", it is seperated "口", "罩"  
so i add smartcn analyzer to tags.zh-TW, it worked as i wanted

---

<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:** [March 12, 2020, 6:55am UTC](https://discuss.elastic.co/t/i-dont-know-why-do-not-match-the-keyword-are-searched/218886/4 "2020-03-12T06:55:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
