我有一个弹性搜索对象,其中一个字段是数组类型。现在我想应用与标准默认分析器不同的分析器。当我在索引定义中传递分析器时,它会抛出错误。我怎样才能做到这一点?
在下面的示例中,技能包含一个值数组。我想要的只是应用不同的分析器并查看结果。我怎样才能做到这一点?
"skills": {
"type": "object",
"analyzer": "simple"
},
"profile": {
"type": "text",
"analyzer": "simple"
},
"job_title": {
"type": "text",
"analyzer": "simple"
},
出现以下错误:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [skills] has unsupported parameters: [analyzer : simple]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_doc]: Mapping definition for [skills] has unsupported parameters: [analyzer : simple]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [skills] has unsupported parameters: [analyzer : simple]"
}
},
"status": 400
}