摘要:
String json = JSON.toJSONStringWithDateFormat(sms, "yyyy-MM-dd HH:mm:ss"); FastJson 将日期格式化
BulkRequest bulkRequest = new BulkRequest();
Integer idx = 1;
for (String json : jsonList) {
IndexRequest request = new IndexRequest(indexName)
.id(idx.toString()) //手动指定ID
.source(json, XContentType.JSON);
bulkRequest.add(request);
idx++;
} 阅读全文
posted @ 2023-03-09 09:04
VipSoft
阅读(437)
评论(0)
推荐(0)
浙公网安备 33010602011771号