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

版本: 6.8-6.8

简而言之,当在Elasticsearch的多字段中使用"include_in_all"选项时,会发生此错误。此选项在多字段中是不允许使用的,使用它会导致此错误。要解决此问题,您可以从多字段定义中删除"include_in_all"选项。或者,您可以使用"copy_to"参数将多个字段的值复制到一个组字段中,然后可以将该组字段作为单个字段进行搜索。这可以作为"include_in_all"功能的一种替代方案。

日志上下文 #

日志"include_in_all in multi fields is not allowed. Found the include_in_all in field [“的类名是 TypeParsers.java。 我们从Elasticsearch源代码中提取了以下内容,以便为那些寻求深入上下文的人提供参考:

name; builder.fieldType.typeName());
 }
 iterator.remove();
 } else if (propName.equals("include_in_all")) {
 if (parserContext.isWithinMultiField()) {
 throw new MapperParsingException("include_in_all in multi fields is not allowed. Found the include_in_all in field ["
 + name + "] which is within a multi field.");
 } else if (parserContext.indexVersionCreated().onOrAfter(Version.V_6_0_0_alpha1)) {
 throw new MapperParsingException("[include_in_all] is not allowed for indices created on or after version 6.0.0 as " +
 "[_all] is deprecated. As a replacement; you can use an [copy_to] on mapping fields to create your " +
 "own catch all field.");