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

版本: 6.8-6.8

简要来说,当 Elasticsearch 中子文档的父 ID 与索引请求中指定的父 ID 不匹配时,会出现此错误。这可能是由于数据输入错误或代码中的 bug 导致的。要解决此问题,您可以验证索引请求中的父 ID,并确保它与子文档的父 ID 匹配。或者,您可以使用正确的父 ID 重新索引子文档。如果错误仍然存在,请检查您的代码是否存在可能导致不匹配的 bug。

日志上下文 #

日志 “Parent id mismatch; document value is [” 的类名是 ParentFieldMapper.java. 我们从 Elasticsearch 源代码中提取了以下内容,以便为那些寻求深入了解上下文的人提供信息:

throw new MapperParsingException("No parent id provided; not within the document; and not externally");
 }
 // we did not add it in the parsing phase; add it now
 fields.add(new SortedDocValuesField(fieldType.name(); new BytesRef(parentId)));
 } else if (parentId != null && !parsedParentId.equals(Uid.createUid(parentType; parentId))) {
 throw new MapperParsingException("Parent id mismatch; document value is [" + Uid.createUid(parsedParentId).id()
 + "]; while external value is [" + parentId + "]");
 }
 }
 }
 // we have parent mapping; yet no value was set; ignore it...