版本: 7.12-7.15
简而言之,当您尝试在Elasticsearch中将运行时字段设置为null时会发生此错误,这是不支持的。运行时字段被设计为始终存在,不能被删除或设置为null。要解决此问题,您可以将字段的值更改为null以外的值,或者使用支持null值的其他字段类型。或者,您可以使用脚本以适合应用程序需求的方式处理null值。
日志上下文 #
日志 “Runtime field [” + fieldName + “] was set to null but its removal is not supported " 的类名是 RuntimeField.java. 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:
String fieldName = entry.getKey();
if (entry.getValue() == null) {
if (supportsRemoval) {
runtimeFields.put(fieldName; null);
} else {
throw new MapperParsingException("Runtime field [" + fieldName + "] was set to null but its removal is not supported " + "in this context");
}
} else if (entry.getValue() instanceof Map) {
@SuppressWarnings("unchecked")
MappropNode = new HashMap<>(((Map) entry.getValue()));





