POST _analyze { "analyzer": "ik_max_word", "text": "一刀999是兄弟就来砍我" }
POST _analyze
{
"analyzer": "ik_max_word",
"text": "一刀999是兄弟就来砍我"
}
标签:Search,end,Elastic,start,token,分词器,offset,position,type From: https://blog.csdn.net/2201_75960169/article/details/140430679{ "tokens" : [ { "token" : "一刀", "start_offset" : 0, "end_offset" : 2, "type" : "CN_WORD", "position" : 0 }, { "token" : "一", "start_offset" : 0, "end_offset" : 1, "type" : "TYPE_CNUM", "position" : 1 }, { "token" : "刀", "start_offset" : 1, "end_offset" : 2, "type" : "COUNT", "position" : 2 }, { "token" : "999", "start_offset" : 2, "end_offset" : 5, "type" : "ARABIC", "position" : 3 }, { "token" : "是", "start_offset" : 5, "end_offset" : 6, "type" : "CN_CHAR", "position" : 4 }, { "token" : "兄弟", "start_offset" : 6, "end_offset" : 8, "type" : "CN_WORD", "position" : 5 }, { "token" : "就来", "start_offset" : 8, "end_offset" : 10, "type" : "CN_WORD", "position" : 6 }, { "token" : "砍", "start_offset" : 10, "end_offset" : 11, "type" : "CN_CHAR", "position" : 7 }, { "token" : "我", "start_offset" : 11, "end_offset" : 12, "type" : "CN_CHAR", "position" : 8 } ] }
{
"tokens" : [
{
"token" : "一刀",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 0
},
{
"token" : "一",
"start_offset" : 0,
"end_offset" : 1,
"type" : "TYPE_CNUM",
"position" : 1
},
{
"token" : "刀",
"start_offset" : 1,
"end_offset" : 2,
"type" : "COUNT",
"position" : 2
},
{
"token" : "999",
"start_offset" : 2,
"end_offset" : 5,
"type" : "ARABIC",
"position" : 3
},
{
"token" : "是",
"start_offset" : 5,
"end_offset" : 6,
"type" : "CN_CHAR",
"position" : 4
},
{
"token" : "兄弟",
"start_offset" : 6,
"end_offset" : 8,
"type" : "CN_WORD",
"position" : 5
},
{
"token" : "就来",
"start_offset" : 8,
"end_offset" : 10,
"type" : "CN_WORD",
"position" : 6
},
{
"token" : "砍",
"start_offset" : 10,
"end_offset" : 11,
"type" : "CN_CHAR",
"position" : 7
},
{
"token" : "我",
"start_offset" : 11,
"end_offset" : 12,
"type" : "CN_CHAR",
"position" : 8
}
]
}