版本: 7.6-8.9
简而言之,当 Elasticsearch 尝试使用 null 值作为正则表达式或日期格式的模式时,会发生此错误。这是不允许的,因为模式必须是有效的字符串。要解决此问题,请确保您提供的模式不为 null。检查您的应用程序代码或 Elasticsearch 配置,以确保所有模式都已正确定义。如果模式是动态提供的,请在使用前添加检查以确保其不为 null。
日志上下文 #
日志"Pattern must not be [null]“类名为 ExpressionBuilder.java。 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入上下文的人参考:
return null;
} String pattern = string(ctx.value);
if (pattern == null) {
throw new ParsingException(source(ctx.value); "Pattern must not be [null]");
} char escape = 0;
PatternEscapeContext escapeCtx = ctx.patternEscape();
String escapeString = escapeCtx == null ? null : string(escapeCtx.escape);





