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

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

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.

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

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