你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
rochy - rochy_he
赞同来自:
trycatchfinal
{ "query": { "match": { "message": "密码错误" } } }
GET {index}/_analyze?text="密码错误" { "tokens": [ { "token": "密", "start_offset": 1, "end_offset": 2, "type": "<IDEOGRAPHIC>", "position": 1 }, { "token": "码", "start_offset": 2, "end_offset": 3, "type": "<IDEOGRAPHIC>", "position": 2 }, { "token": "错", "start_offset": 3, "end_offset": 4, "type": "<IDEOGRAPHIC>", "position": 3 }, { "token": "误", "start_offset": 4, "end_offset": 5, "type": "<IDEOGRAPHIC>", "position": 4 } ] }
点火三周
{ "app_template": { "order": 0, "index_patterns": [ "app_*" ], "settings": { "index": { "refresh_interval": "15s", "analysis": { "analyzer": { "message_analyzer": { "pattern": """=|,|_|\.|\s|-|\[|\]|\*|\|""", "tokenizer": "pattern" } } }, "number_of_shards": "4", "number_of_replicas": "1" } }, "mappings": { "doc": { "properties": { "message": { "type": "text", "analyzer": "message_analyzer" } } } }, "aliases": {} } }
要回复问题请先登录或注册
3 个回复
rochy - rochy_he
赞同来自:
查询的时候使用 q=message:"密码错误" 即可搜索到相关结构
trycatchfinal
赞同来自:
我测试了下,默认分词把每个汉字都当成了一个token,这样就能够理解了
点火三周
赞同来自: