elasticsearchTemplate.getClient().prepareIndex(indexName, type).setId(id).setSource(json).setOpType(IndexRequest.OpType.CREATE).execute().actionGet();
Es uses id and OpType to check if it exists when inserting
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324906010&siteId=291194637
Recommended
Ranking