From 200ebc1694a3758a96ae87daaf3eb3fa5076b306 Mon Sep 17 00:00:00 2001 From: liyawei Date: Fri, 26 Aug 2022 16:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=AD=E5=BF=83-=E6=B3=95?= =?UTF-8?q?=E8=A7=84=E6=9C=88=E6=8A=A5-=E6=9F=A5=E8=AF=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/document/enums/SearchEnum.java | 4 ++-- .../LawsMonthlyReportManageEOServiceImpl.java | 15 +++++++-------- .../impl/LawsMonthlyReportSearchServiceImpl.java | 3 ++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java index 40e1d088a..17f23c7bf 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/enums/SearchEnum.java @@ -8,8 +8,8 @@ package com.jero.modules.document.enums; public enum SearchEnum { INDEX_NAME_DOCUMENT("文档库索引名称","documentLibrary"), TYPE_NAME_DOCUMENT("文档库类型","document"), - INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsMonthlyReportManage"), - TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsMonthlyReport"), + INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsmonthlyreportmanage"), + TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsmonthlyreport"), FULL_TEXT_SEARCH("全部中文","fulltextsearchcn"), FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"), FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen"), diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportManageEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportManageEOServiceImpl.java index c96a1553d..85f26e2c4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportManageEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportManageEOServiceImpl.java @@ -191,20 +191,20 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl> mapListTempEn = new ArrayList<>(); //文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG putMap(id, "法规月报", - fileText, monthlyReportManageEO.getName(), fileText, + fileText, monthlyReportManageEO.getName(), ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG); - //文件相关封装英文的全文内容(es) 搜索条件下的: flag---null + //文件相关封装英文的全文内容(es) putMap(id, "monthly report", - fileText, monthlyReportManageEO.getName(), fileText, + fileText, monthlyReportManageEO.getName(), ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG); - //文件相关封装中文的全文内容(es) + //文件相关封装中文的全文内容(es) 搜索条件下的: flag---null putMap(id + monthlyReportManageEO.getFileId(), "法规月报", - fileText, monthlyReportManageEO.getName(), fileText, + fileText, monthlyReportManageEO.getName(), ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null); //文件相关封装英文的全文内容(es) putMap(id + monthlyReportManageEO.getFileId(), "monthly report", - fileText, monthlyReportManageEO.getName(), fileText, + fileText, monthlyReportManageEO.getName(), ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null); mapListTempCn.add(stringMapCn); @@ -247,7 +247,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl stringMap, String flag){ @@ -256,7 +256,6 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl map25 = new HashMap<>(); Map map45 = new HashMap<>(); map25.put("query", selectValue); + map25.put("fields", fieldList.toArray()); map25.put("allow_leading_wildcard", false); //禁用了前置通配符 map45.put("query_string", map25); queryMapJson.add(map45); @@ -234,7 +235,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea list1.add(""); mapTemp.put("pre_tags", list); mapTemp.put("post_tags", list1); - mapTemp.put("fragment_size", 450);//高亮字段内容长度,去除html样式标签,统计字数,设置为200 + mapTemp.put("fragment_size", 500);//高亮字段内容长度,去除html样式标签,统计字数,设置为200 mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段 mapTemp.put("type", "plain"); mapHighlight.put(key, mapTemp);