Selaa lähdekoodia

Merge branch 'dev' of LiTaohong/jkzl-start into dev

chenweida 7 vuotta sitten
vanhempi
commit
b3f7da2f60

+ 4 - 2
common-data-es-starter/src/main/java/com/yihu/base/es/config/ElastricSearchHelper.java

@ -177,8 +177,9 @@ public class ElastricSearchHelper {
    /**
     * 删除
     */
    public void delete(String index, String type, List<Object> datas) {
    public boolean delete(String index, String type, List<Object> datas) {
        JestClient jestClient = null;
        BulkResult br = null;
        try {
            jestClient = elasticFactory.getJestClient();
@ -188,7 +189,7 @@ public class ElastricSearchHelper {
                Delete indexObj = new Delete.Builder(((ESIDEntity) obj).getId()).build();
                bulk.addAction(indexObj);
            }
            BulkResult br = jestClient.execute(bulk.build());
            br = jestClient.execute(bulk.build());
            logger.info("delete data count:" + datas.size());
@ -200,6 +201,7 @@ public class ElastricSearchHelper {
                jestClient.shutdownClient();
            }
        }
        return br.isSucceeded();
    }