71145 搜索中心-根据附件名称搜索知识分享。

This commit is contained in:
wangzhijiang
2023-06-21 09:30:42 +08:00
parent 41241446a5
commit d26f247bb6
2 changed files with 8 additions and 0 deletions
@@ -436,6 +436,13 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("create_time",new Date());
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
String accessoryFileName = "";
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getAccessoryFile())){
List<OSSFile> accessoryFileList = this.iOSSFileService.getFileInfos(problemKnowledgeBaseEO.getAccessoryFile());
accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
}
convertAfterMap.put("file_name",accessoryFileName);
}
}
@@ -1252,6 +1252,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5
fieldList.add("content");//权重4
fieldList.add("file_name");//权重3
//fieldList.add("module_type");
//fieldList.add("id");
//fieldList.add("flag");