fix
This commit is contained in:
parent
b82f44543e
commit
d90217c0ee
@ -99,12 +99,15 @@ public class DocAppServiceImpl implements DocAppService{
|
||||
}
|
||||
});
|
||||
if(clearAll) {
|
||||
List<String> allSearchableFilesRelaPath = osRecordDTOS.stream()
|
||||
.filter(e -> e.getSearchableStatus() == SearchableStatusEnum.SUCCESS.code)
|
||||
.map(OSRecordDTO::getLocalRelaFilePath).collect(Collectors.toList());
|
||||
// 删除本地文件
|
||||
LocalFileUtil.deleteFilesByRelativePath(osProperties.getLocalSearchablePathPrefix(), filesLocalRelaPath);
|
||||
LocalFileUtil.deleteFilesByRelativePath(osProperties.getLocalSearchablePathPrefix(), allSearchableFilesRelaPath);
|
||||
// 删除ES
|
||||
esGateway.deleteByFilepaths(filesLocalRelaPath);
|
||||
esGateway.deleteByFilepaths(allSearchableFilesRelaPath);
|
||||
// 删除缓存
|
||||
fileCacheService.removeMetaCacheBatch(filesLocalRelaPath);
|
||||
fileCacheService.removeMetaCacheBatch(allSearchableFilesRelaPath);
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user