我正在尝试使用导致异常的以下 JSON 创建 Elasticsearch 索引。我正在使用的当前版本的弹性搜索是 6.4.0。
异常表示根映射定义具有不受支持的参数。不知道是什么问题
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"filter": [
"lowercase"
],
"char_filter": [
"html_strip"
],
"type": "custom",
"tokenizer": "whitespace"
}
}
}
},
"mappings" :{
"properties" :{
"title" :{
"type" : "text",
"analyzer" : "my_analyzer"
}
}
}
}
这导致以下异常:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [title : {analyzer=my_analyzer, type=text}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [title : {analyzer=my_analyzer, type=text}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [title : {analyzer=my_analyzer, type=text}]"
}
},
"status": 400
}