修改了检查文件是否已被es构建
This commit is contained in:
parent
801bbe4970
commit
46b5f940f2
|
|
@ -65,12 +65,18 @@ public class EsTDatasetFilesImporter {
|
|||
log.debug(filePath + " 不存在,跳过");
|
||||
continue;
|
||||
}
|
||||
if(document.getIsEs()){
|
||||
log.info("documentId=" + document.getId() + " 是ES索引文件,跳过");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 调用你的文件处理逻辑,将文件内容与 document 信息一起构建索引
|
||||
try {
|
||||
processFileWithDocumentInfo(document);
|
||||
finished++;
|
||||
redisTemplate.opsForValue().set("import:task:" + taskId + ":finished", String.valueOf(finished));
|
||||
document.setIsEs(true);
|
||||
datasetFilesService.updateFile(document);
|
||||
log.debug("documentId=" + document.getId() + " 索引构建成功");
|
||||
} catch (Exception e) {
|
||||
log.debug("documentId=" + document.getId() + " 索引构建失败: " + e.getMessage());
|
||||
|
|
|
|||
Loading…
Reference in New Issue