ES删除数据
作者:互联网
ES删除数据
注意:删除数据请谨慎执行
删除大于**日期的,其他场景可参照执行
DeleteQuery deleteQuery = new DeleteQuery();
deleteQuery.setIndex("es中_index");
deleteQuery.setType("es中_type");
BoolQueryBuilder createDate = QueryBuilders.boolQuery().filter(QueryBuilders.rangeQuery("createDate").gte("data条件"));
deleteQuery.setQuery(createDate);
elasticsearchTemplate.delete(deleteQuery);
参考:
https://blog.csdn.net/xnlej/article/details/80422457?ops_request_misc=%7B%22request%5Fid%22%3A%22158312012319725222445776%22%2C%22scm%22%3A%2220140713.130056874…%22%7D&request_id=158312012319725222445776&biz_id=0&utm_source=distribute.pc_search_result.none-task
https://segmentfault.com/a/1190000017123560
标签:删除,22%,DeleteQuery,https,deleteQuery,数据,createDate,ES 来源: https://blog.csdn.net/weixin_43114485/article/details/104612572