localhost:9200/yigo-redist.1/_analyze?analyzer=default&text=全能片(前)---TRW-GDB7891AT刹车片自带报警线,无单独报警线号码,卡仕欧,卡仕欧,乘用车,刹车片
如果结果为:
{
"tokens" : [ {
"token" : "全能",
"start_offset" : 0,
"end_offset" : 2,
"type" : "CN_WORD",
"position" : 1
}, {
"token" : "片",
"start_offset" : 2,
"end_offset" : 3,
"type" : "CN_CHAR",
"position" : 2
}, {
"token" : "前",
"start_offset" : 4,
"end_offset" : 5,
"type" : "CN_CHAR",
"position" : 3
}, {
"token" : "trw-gdb7891at",
"start_offset" : 9,
"end_offset" : 22,
"type" : "LETTER",
"position" : 4
}, {
"token" : "刹车片",
"start_offset" : 22,
"end_offset" : 25,
"type" : "CN_WORD",
"position" : 5
}, {
"token" : "自带",
"start_offset" : 25,
"end_offset" : 27,
"type" : "CN_WORD",
"position" : 6
}, {
"token" : "报警",
"start_offset" : 27,
"end_offset" : 29,
"type" : "CN_WORD",
"position" : 7
}, {
"token" : "线",
"start_offset" : 29,
"end_offset" : 30,
"type" : "CN_CHAR",
"position" : 8
}, {
"token" : "无",
"start_offset" : 31,
"end_offset" : 32,
"type" : "CN_WORD",
"position" : 9
}, {
"token" : "单独",
"start_offset" : 32,
"end_offset" : 34,
"type" : "CN_WORD",
"position" : 10
}, {
"token" : "报警",
"start_offset" : 34,
"end_offset" : 36,
"type" : "CN_WORD",
"position" : 11
}, {
"token" : "线",
"start_offset" : 36,
"end_offset" : 37,
"type" : "CN_CHAR",
"position" : 12
}, {
"token" : "号码",
"start_offset" : 37,
"end_offset" : 39,
"type" : "CN_WORD",
"position" : 13
}, {
"token" : "卡",
"start_offset" : 40,
"end_offset" : 41,
"type" : "CN_CHAR",
"position" : 14
}, {
"token" : "仕",
"start_offset" : 41,
"end_offset" : 42,
"type" : "CN_WORD",
"position" : 15
}, {
"token" : "欧",
"start_offset" : 42,
"end_offset" : 43,
"type" : "CN_WORD",
"position" : 16
}, {
"token" : "卡",
"start_offset" : 44,
"end_offset" : 45,
"type" : "CN_CHAR",
"position" : 17
}, {
"token" : "仕",
"start_offset" : 45,
"end_offset" : 46,
"type" : "CN_WORD",
"position" : 18
}, {
"token" : "欧",
"start_offset" : 46,
"end_offset" : 47,
"type" : "CN_WORD",
"position" : 19
}, {
"token" : "乘用车",
"start_offset" : 48,
"end_offset" : 51,
"type" : "CN_WORD",
"position" : 20
}, {
"token" : "刹车片",
"start_offset" : 52,
"end_offset" : 55,
"type" : "CN_WORD",
"position" : 21
} ]
}
localhost:9200//yigo-redist.1/_analyze?analyzer=default_search&text=gdb7891
{
"tokens" : [ {
"token" : "gdb7891",
"start_offset" : 0,
"end_offset" : 7,
"type" : "LETTER",
"position" : 1
} ]
}
localhost:9200//yigo-redist.1/_analyze?analyzer=default&text=gdb7891
{
"tokens" : [ {
"token" : "gdb7891",
"start_offset" : 0,
"end_offset" : 7,
"type" : "LETTER",
"position" : 1
}, {
"token" : "",
"start_offset" : 0,
"end_offset" : 7,
"type" : "LETTER",
"position" : 1
}, {
"token" : "gdb7891",
"start_offset" : 0,
"end_offset" : 7,
"type" : "LETTER",
"position" : 1
}, {
"token" : "",
"start_offset" : 0,
"end_offset" : 3,
"type" : "ENGLISH",
"position" : 2
}, {
"token" : "gdb",
"start_offset" : 0,
"end_offset" : 3,
"type" : "ENGLISH",
"position" : 2
}, {
"token" : "gdb",
"start_offset" : 0,
"end_offset" : 3,
"type" : "ENGLISH",
"position" : 2
}, {
"token" : "7891",
"start_offset" : 3,
"end_offset" : 7,
"type" : "ARABIC",
"position" : 3
}, {
"token" : "7891",
"start_offset" : 3,
"end_offset" : 7,
"type" : "ARABIC",
"position" : 3
}, {
"token" : "",
"start_offset" : 3,
"end_offset" : 7,
"type" : "ARABIC",
"position" : 3
} ]
}
{
"query": {
"wildcard" : { "description" : "*gdb7891*" }
}
}