版本: 6.8-8.9
简而言之,当 Elasticsearch 在日期直方图聚合过程中遇到无法识别的舍入 ID 时,会发生此错误。这可能是由于拼写错误或不支持的舍入值造成的。要解决此问题,请确保使用的舍入 ID 是支持的值之一,如 ‘year’、‘quarter’、‘month’、‘week’、‘day’、‘hour’、‘minute’、‘second’。此外,检查舍入 ID 中是否存在任何拼写错误。如果错误仍然存在,请考虑更新 Elasticsearch 版本,因为某些舍入 ID 仅在较新版本中受支持。
日志上下文 #
日志 “unknown rounding id [” + id + “]” 的类名是 Rounding.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入理解的人参考:
byte id = in.readByte();
return switch (id) {
case TimeUnitRounding.ID -> new TimeUnitRounding(in);
case TimeIntervalRounding.ID -> new TimeIntervalRounding(in);
case OffsetRounding.ID -> new OffsetRounding(in);
default -> throw new ElasticsearchException("unknown rounding id [" + id + "]");
};
}
/**
* Implementation of {@link Prepared} using pre-calculated "round down" points.





