painless 向es 写入数据 提示failed to parse field [attributes.xxx] of type [date] in document with id 'xxx'. Preview of field's value: '2028-02-21 00:00:00']
if (attrValue instanceof String && checkTimeFormat(attrValue.toString())) {
updateScript = String.format("def datetime = params.value; ctx._source.attributes.%s = datetime;",attrId) ;
}
private boolean checkTimeFormat(String validateDate) {
Date tmpDate = DateUtil.convert2Date(validateDate);
return Objects.nonNull(tmpDate);
}

浙公网安备 33010602011771号