【发布时间】:2020-05-28 19:29:04
【问题描述】:
通过如下注册标记字符创建标记器时,无法注册罗马“X”。(测试 ES 版本:ES6.7,ES5.6)
"tokenizer": {
"autocomplete": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 14,
"token_chars": [
"Ⅹ"
]
}
}
错误日志是这样的
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[node02][192.168.115.x:9300][indices:admin/create]"}] ,"type":"illegal_argument_exception","reason":"未知 令牌类型:'ⅹ',必须是 [symbol, private_use, 段落分隔符,开始标点符号,未分配,封闭标记, connector_punctuation, letter_number, other_number, math_symbol, 小写字母、空格分隔符、代理项、 initial_quote_punctuation,decimal_digit_number,数字, other_punctuation、dash_punctuation、currency_symbol、 non_spacing_mark,格式,modifier_letter,控制,大写字母, other_symbol, end_punctuation, modifier_symbol, other_letter, line_separator、titlecase_letter、字母、标点符号、 combine_spacing_mark, final_quote_punctuation, 空格]"},"状态":400}
如何将罗马数字标记为术语?
【问题讨论】:
-
你能举个例子说明你想要达到的目标吗?
标签: elasticsearch lucene tokenize elasticsearch-analyzers