fix: 修复调用系统内置文件表创建es索引
This commit is contained in:
parent
4bc2ff060a
commit
2ae5f2f4ad
|
|
@ -6,6 +6,7 @@ import com.bjtds.brichat.enums.IndexingStatusEnum;
|
||||||
import com.bjtds.brichat.mapper.postgresql.DifyDatasetsDocMapper;
|
import com.bjtds.brichat.mapper.postgresql.DifyDatasetsDocMapper;
|
||||||
import com.bjtds.brichat.service.DatasetFilesService;
|
import com.bjtds.brichat.service.DatasetFilesService;
|
||||||
import com.bjtds.brichat.service.EsKnowledgeService;
|
import com.bjtds.brichat.service.EsKnowledgeService;
|
||||||
|
import com.bjtds.brichat.service.EsTDatasetFilesService;
|
||||||
import com.bjtds.brichat.service.IndexingTaskQueueService;
|
import com.bjtds.brichat.service.IndexingTaskQueueService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
@ -36,7 +37,7 @@ public class IndexingStatusTaskService {
|
||||||
private DifyDatasetsDocMapper difyDatasetsDocMapper;
|
private DifyDatasetsDocMapper difyDatasetsDocMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private EsKnowledgeService esKnowledgeService;
|
private EsTDatasetFilesService esTDatasetFilesService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务:每1秒检查一次文档索引状态
|
* 定时任务:每1秒检查一次文档索引状态
|
||||||
|
|
@ -100,7 +101,7 @@ public class IndexingStatusTaskService {
|
||||||
|
|
||||||
|
|
||||||
//添加索引到ES
|
//添加索引到ES
|
||||||
esKnowledgeService.createIndex(task.getDocumentId());
|
esTDatasetFilesService.createIndex(task.getDocumentId());
|
||||||
//修改文件状态
|
//修改文件状态
|
||||||
TDatasetFiles file = datasetFilesService.getFileById(task.getFileId());
|
TDatasetFiles file = datasetFilesService.getFileById(task.getFileId());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue