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

版本: 6.8-6.8

简而言之,当您在Elasticsearch 6.0.0或更高版本中尝试使用"include_in_all"参数时会出现此错误。该参数在这些版本中已被弃用并移除。要解决此问题,您可以降级到支持"include_in_all"的版本,或者使用"copy_to"参数将多个字段的值复制到一个组字段中,然后对该字段进行搜索。或者,您可以使用包含要搜索字段的自定义"all"字段。

日志上下文 #

日志"[include_in_all] is not allowed for indices created on or after version 6.0.0 as"的类名是 TypeParsers.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入背景的人参考:

} 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.");
 } else {
 builder.includeInAll(nodeBooleanValue(name; "include_in_all"; propNode; parserContext));
 }