版本: 6.8-8.9
简要来说,当 Elasticsearch 无法解析计划表时会出现此错误,原因是计划表字段中的 cron 语法不正确或缺失。这可能是由于 cron 表达式格式错误或计划表字段为空导致的。要解决此问题,请确保 cron 表达式按照 Quartz cron 格式正确格式化。此外,请确保计划表字段不为空。如果不使用计划表,可以考虑完全删除该字段。
日志上下文 #
日志 “could not parse schedule: {}” 的类名是 IntervalSchedule.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
if (token == XContentParser.Token.VALUE_STRING) {
String value = parser.text();
return new IntervalSchedule(Interval.parse(value));
}
} catch (Exception e) {
throw new ElasticsearchParseException("could not parse schedule: {}", e, e.getMessage());
}
throw new ElasticsearchParseException(
"could not parse [{}] schedule. expected either a numeric value "
+ "(millis) or a string value representing time value (e.g. '5s'), but found [{}]",
TYPE
);





