我正在使用:
createResponce = client.admin().indices().prepareCreate("raw_cluster_pk")
.addMapping("btas_pk",
"CDR_Generation_Number", "type=long",
"CDR_Version_Number", "type=string",
"Call_Initiation_Time", "type=date",/*"dateFormat=MMddyyyyHHmmssSSS"*/).get();
获取数据:
{
"fieldNames": [{
"fieldname": "CDR_Generation_Number",
"fieldtype": "long"
}, {
"fieldname": "CDR_Version_Number",
"fieldtype": "string"
}, {
"fieldname": "Call_Initiation_Time",
"dateFormat": "MMddyyyyHHmmssSSS",
"fieldtype": "date"
}]
}
所以我需要建议如何在类似于类型的java代码中添加dateFormat?