Hi All,
We are in the process of doing elasticsearch spring boot integration POC. We were stuck with data format issues during date save. Below are the details of my example.
elasticsearch-6.4.0
Spring Boot 2.1.0.RELEASE
Vo Property:
//@Field(type = FieldType.Date, format = DateFormat.custom, pattern = "dd.MM.yyyy hh:mm")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
//@Field(type = FieldType.Date, index = FieldIndex.not_analyzed store = true, format = DateFormat.custom , pattern = "dd/MM/yyyy")
private Date appSubDate;
DAO Method:
public List getAllApplications()
{
List applyVo = new ArrayList();
try{
applyVo=getJdbcTemplate().query("select app_key appKey,APP_FIRST_NAME appFirstName, APP_LAST_NAME appLastName, to_char(app_sub_date, 'yyyy-MM-dd') appSubDate from APPLICATION where NBR=?", new Object{"Number"}, new BeanPropertyRowMapper(ApplyVo.class));
}catch(Exception e){
System.out.println(e.getMessage());
}
return applyVo;
}
Error:
Caused by: org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: no requests added;