【发布时间】:2020-11-17 23:15:07
【问题描述】:
我有一个弹性搜索对象,其中一个字段是数组类型。现在我想应用与标准默认分析器不同的分析器。当我在索引定义中传递分析器时,它会抛出错误。我该怎么做?
在下面的示例中,技能包含一个值数组。我想要的只是应用不同的分析器并查看结果。我怎样才能做到这一点?
"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
}
【问题讨论】:
-
这将有助于查看您遇到的错误以及您正在运行的不同命令
-
更新了有问题的错误信息
-
您只能为
text字段定义和分析器,而不能为object字段定义和分析器 -
我该如何解决这个问题?
-
你能展示一个你想搜索的示例文档吗?
标签: elasticsearch eclipse-memory-analyzer elasticsearch-analyzers