Commit ca2500f8 by sunxiwang

fix

1 parent 0d00455b
......@@ -238,7 +238,7 @@ public class ElasticSearch {
public void insertBatchAsync(String idxName, List<JSONObject> list, Consumer<List<JSONObject>> consumer) {
BulkRequest request = new BulkRequest();
list.parallelStream().forEach(item -> request.add(new IndexRequest(idxName, "_doc").id(item.getString("msgid"))
list.forEach(item -> request.add(new IndexRequest(idxName, "_doc").id(item.getString("msgid"))
.source(item, XContentType.JSON)));
try {
if (!CollectionUtils.isEmpty(request.requests())) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!