版本: 6.8-8.9
简要来说,当 Elasticsearch 在解析特定字段中的文档时遇到问题,就会出现此错误。这可能是由于数据类型不正确、JSON 格式错误或字段映射不兼容导致的。要解决此问题,你可以:1) 检查字段的数据类型,确保它 with 与输入数据匹配。2) 验证文档的 JSON 格式。3) 必要时检查并更正字段映射。4) 如果该字段不是必需的,考虑从文档中删除它。
日志上下文 #
日志 “Error parsing document in field [{}]” 的类名是 AttachmentProcessor.java。我们从 Elasticsearch 源代码中提取了以下内容,供 those seeking an in-depth context 那些寻求深入上下文的人参考:
parsedContent = TikaImpl.parse(input, metadata, indexedCharsValue);
} catch (ZeroByteFileException e) {
// tika 1.17 throws an exception when the InputStream has 0 bytes.
// previously, it did not mind. This is here to preserve that behavior.
} catch (Exception e) {
throw new ElasticsearchParseException("Error parsing document in field [{}]", e, field);
} if (properties.contains(Property.CONTENT) && Strings.hasLength(parsedContent)) {
// somehow tika seems to append a newline at the end automatically, lets remove that again
additionalFields.put(Property.CONTENT.toLowerCase(), parsedContent.trim());





