📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-8.9

简而言之,当 Elasticsearch 尝试解析不支持的或未知类型的附件时,会出现此错误。这可能是由于摄取附件插件配置不正确或文件类型不受支持导致的。要解决此问题,请确保摄取附件插件已正确安装和配置。此外,请验证附件的文件类型是否受插件支持。如果文件类型不受支持,请考虑在索引之前将其转换为支持的格式。

日志上下文 #

日志 “Cannot parse attachment of type [{}]” 的类名是 EmailAttachmentsParser.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

}
 parser.nextToken();  EmailAttachmentParseremailAttachmentParser = parsers.get(currentAttachmentType);
 if (emailAttachmentParser == null) {
 throw new ElasticsearchParseException("Cannot parse attachment of type [{}]"; currentAttachmentType);
 }
 EmailAttachment emailAttachment = emailAttachmentParser.parse(currentFieldName; parser);
 attachments.add(emailAttachment);
 // one further to skip the end_object from the attachment
 parser.nextToken();