您好。 用您写的拼音分词器v1 .3 .0, es版本1 .7 .2。
以下定义的是获取汉字的拼音前缀
prefix_pinyin_analyzer:
tokenizer: prefix_pinyin_tokenizer
filter: [lowercase, word_delimiter]
prefix_pinyin_tokenizer:
type: pinyin
padding_char: ""
first_letter: only
执行分析语句:
GET / suggest_idx_1 / _analyze ? analyzer = prefix_pinyin_analyzer {
"text": "A快递"
}
预计结果是 "akd",
但结果是: "kkd"。
请问怎么处理? {
"tokens": [{
"token": "text",
"start_offset": 5,
"end_offset": 9,
"type": "word",
"position": 1
}, {
"token": "kkd",
"start_offset": 12,
"end_offset": 15,
"type": "word",
"position": 2
}]
}
以下定义的是获取汉字的拼音前缀
prefix_pinyin_analyzer:
tokenizer: prefix_pinyin_tokenizer
filter: [lowercase, word_delimiter]
prefix_pinyin_tokenizer:
type: pinyin
padding_char: ""
first_letter: only
执行分析语句:
GET / suggest_idx_1 / _analyze ? analyzer = prefix_pinyin_analyzer {
"text": "A快递"
}
预计结果是 "akd",
但结果是: "kkd"。
请问怎么处理? {
"tokens": [{
"token": "text",
"start_offset": 5,
"end_offset": 9,
"type": "word",
"position": 1
}, {
"token": "kkd",
"start_offset": 12,
"end_offset": 15,
"type": "word",
"position": 2
}]
}
2 个回复
medcl - 今晚打老虎。
赞同来自:
chennanlcy - elasticsearch爱好者
赞同来自: