【发布时间】:2020-10-12 08:33:16
【问题描述】:
我尝试将该字段映射为用户定义的字段 - 弹性搜索中的“附件”,如下所示
"file": {
"type": "attachment",
"fields": {
"content": {
"type": "text"
},
"author": {
"type": "text",
"store": true
}
}
附件映射如下,
"attachment": {
"properties": {
"author": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"content": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
但我收到以下错误:
java.util.concurrent.ExecutionException: RemoteTransportException[[3cfb4e163654][172.17.0.2:9300][indices:admin/create]]; nested: MapperParsingException[Failed to parse mapping [mappings]: No handler for type [attachment] declared on field [file]]; nested: MapperParsingException[No handler for type [attachment] declared on field [file]];
[无法解析映射 [mappings]:没有在字段 [file] 上声明的类型 [attachment] 的处理程序]
我已经将摄取附件插件添加到弹性搜索插件中,当我在弹性搜索中列出该插件时它可用。
我的映射有什么问题?
请帮我解决这个问题?
谢谢,
哈利
【问题讨论】:
-
能否分享整个mapping.json,让我自己试试
-
是的,
mapping是部分的。 @harry 在attachment中添加file的映射 -
@OpsterElasticsearchNinja codeshare.io/5gYjjB我已经分享了完整的json
-
@Gibbs codeshare.io/5gYjjB我已经分享了json,请告诉我我需要做的修改
标签: elasticsearch elasticsearch-plugin elasticsearch-7