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

版本: 7.9-8.9

简而言之,当尝试在 Elasticsearch 的嵌套对象映射上更新 [include_in_parent] 参数时会发生此错误。该参数一旦设置就不可变且无法更改。要解决此问题,您可以使用所需的设置重新创建索引,或者使用正确的设置创建新索引,并将数据从旧索引重新索引到新索引。

日志上下文 #

日志 “the [include_in_parent] parameter can’t be updated on a nested object mapping” 的类名是 NestedObjectMapper.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

if (mergeWithObject.includeInRoot.explicit()) {
 toMerge.includeInRoot = mergeWithObject.includeInRoot;
 }
 } else {
 if (includeInParent.value() != mergeWithObject.includeInParent.value()) {
 throw new MapperException("the [include_in_parent] parameter can't be updated on a nested object mapping");
 }
 if (includeInRoot.value() != mergeWithObject.includeInRoot.value()) {
 throw new MapperException("the [include_in_root] parameter can't be updated on a nested object mapping");
 }
 }