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

版本: 6.8-8.9

简要来说,当 Elasticsearch 无法解析时间时会出现此错误,原因是提供的分钟值不是数字。这可能是由于数据类型或格式不正确造成的。要解决此问题,请确保:1、时间值格式正确;2、分钟值是数值类型;3、检查映射并确保字段正确映射为日期类型;4、如果使用脚本或应用程序输入数据,验证其是否正确格式化时间值。

日志上下文 #

日志 “could not parse time [{}]. time minute [{}] is not a number” 的类名是 DayTimes.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的用户参考:

    throw new ElasticsearchParseException("could not parse time [{}]. time hour [{}] is not a number", time, hrStr);
}
try {
    minute = new int[] { Integer.parseInt(minStr) };
} catch (NumberFormatException nfe) {
    throw new ElasticsearchParseException("could not parse time [{}]. time minute [{}] is not a number", time, minStr);
}
try {
    return new DayTimes(time, hour, minute);
} catch (IllegalArgumentException iae) {
    throw new ElasticsearchParseException("could not parse time [{}]", iae);
}