Es 利用id、OpType实现插入时候检查是否存在

elasticsearchTemplate.getClient().prepareIndex(indexName, type).setId(id).setSource(json).setOpType(IndexRequest.OpType.CREATE).execute().actionGet();

posted on 2018-04-26 21:41  yangjingzhi  阅读(967)  评论(0)    收藏  举报

导航