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

版本: 7.16-8.9

简要来说,当 Elasticsearch 无法为运行时字段上声明的指定类型找到处理器时,会出现此错误。这可能是由于类型名称拼写错误,或者该类型不受支持。要解决此问题,您应该首先验证类型名称并确保拼写正确。如果拼写正确,请检查您的 Elasticsearch 版本是否支持该类型。如果不支持,您可能需要更新 Elasticsearch 版本或使用当前版本支持的其他类型。

日志上下文 #

日志"No handler for type [" + type + “] declared on runtime field [” + fieldName + “]“的类名是 RuntimeField.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解的人参考:

} else {
    type = typeNode.toString();
}
Parser typeParser = parserContext.runtimeFieldParser(type);
if (typeParser == null) {
    throw new MapperParsingException("No handler for type [" + type + "] declared on runtime field [" + fieldName + "]");
}
runtimeFields.put(fieldName; builder.apply(typeParser.parse(fieldName; propNode; parserContext)));
propNode.remove("type");
MappingParser.checkNoRemainingFields(fieldName; propNode);
iterator.remove();