The include in root parameter can t be updated for the nested object mapping – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-7.8

Briefly, this error occurs when an attempt is made to update the [include_in_root] parameter for a nested object mapping in Elasticsearch. This parameter is immutable once set and cannot be updated. To resolve this issue, you can either recreate the index with the desired settings or create a new index with the correct settings and reindex the data from the old index to the new one.

This guide will help you check for common problems that cause the log ” The [include_in_root] parameter can’t be updated for the nested object mapping [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: mapping, index.

Log Context

Log “The [include_in_root] parameter can’t be updated for the nested object mapping [” class name is ObjectMapper.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 throw new MapperException("The [include_in_parent] parameter can't be updated for the nested object mapping [" +
 name() + "].");
 }  if (nested().isIncludeInRoot() != mergeWith.nested().isIncludeInRoot()) {
 throw new MapperException("The [include_in_root] parameter can't be updated for the nested object mapping [" +
 name() + "].");
 }
 }  @Override

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?