elasticsearch version is 7.3 and spring-boot-starter-data-elasticsearch version is 2.2.2.release
this is my model
@Field(type = FieldType.Date ,store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd'T'hh:mm:ss.SSS'Z'")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
@JsonProperty(value = "createtime")
private Date ctime;
private String name;
and when i try to insert data
Label label = new Label();
label.setCtime(new Date());
label.setName("admin");
LabelRepository.save(label);
I can successfully insert the data, but when I look at the data, no createtime in the document
"hits": [
{
"_index": "label",
"_type": "_doc",
"_id": "3fc7e940f25843d4886b85e0461bc9d7",
"_score": 3.3787246,
"_source": {
"name":"admin"
}
}
]
index mapping
"createTime": {
"type": "date",
"store": true,
"format": "yyyy-MM-dd'T'hh:mm:ss.SSS'Z'"
}
but it was ok when elasticsearch6.8 + springboot 2.0.4
what should i do ?
Comment From: snicoll
@coldwarm7 please ask your question on StackOverflow or on the Elasticserach forum for help on upgrading to ES 7.5.