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);

ES删除数据

参考:
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

ES删除数据ES删除数据 weixin_ab 发布了41 篇原创文章 · 获赞 5 · 访问量 1万+ 私信 关注
上一篇:flutter---上拉加载 下拉刷新


下一篇:使用代码创建ABAP transparent table