【发布时间】:2018-06-23 02:54:02
【问题描述】:
我正在尝试与我的 custom_analyzer 和 tokenizer 一起进行字段映射,但我遇到了一些错误。
请在下面找到映射字段时从 kibana 得到的错误
Custom Analyzer [custom_analyzer] failed to find tokenizer under name [my_tokenizer]
请找到我的映射详细信息。
PUT attach_local
{
"settings": {
"analysis": {
"analyzer": {
"custom_analyzer": {
"type": "custom",
"tokenizer": "my_tokenizer",
"char_filter": [
"html_strip"
],
"filter": [
"lowercase",
"asciifolding"
]
}
}
}
},
"tokenizer": {
"my_tokenizer": {
"type": "ngram",
"min_gram": 3,
"max_gram": 3,
"token_chars": [
"letter",
"digit"
]
}
},
"mappings" : {
"doc" : {
"properties" : {
"attachment" : {
"properties" : {
"content" : {
"type" : "text",
"analyzer": "custom_analyzer"
},
"content_length" : {
"type" : "long"
},
"content_type" : {
"type" : "text"
},
"language" : {
"type" : "text"
}
}
},
"resume" : {
"type" : "text"
}
}
}
}
}
【问题讨论】:
-
每当我使用 curl 甚至 postman 时,我都会使用 jsonformatter.curiousconcept.com 来验证我的 json
标签: java elasticsearch elastic-stack