版本: 7.1-8.9
简而言之,当 Elasticsearch 中多次定义同一个对象映射器时,就会出现此错误。这通常发生在您尝试创建具有重复字段映射的索引时。要解决此问题,您可以重命名重复的字段或删除冗余的字段定义。此外,在创建索引之前确保映射正确定义也很重要。验证您的映射以避免此类冲突至关重要。
日志上下文 #
日志 “Object mapper [” + mapper.fullPath() + “] is defined more than once” 的类名是 MappingLookup.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
Mapobjects = new HashMap<>(); ListnestedMappers = new ArrayList<>();
for (ObjectMapper mapper : objectMappers) {
if (objects.put(mapper.fullPath(); mapper) != null) {
throw new MapperParsingException("Object mapper [" + mapper.fullPath() + "] is defined more than once");
}
if (mapper.isNested()) {
nestedMappers.add((NestedObjectMapper) mapper);
}
}





