Parcourir la source

feat:数据导出单个字搜索范围加上title

fuwencai il y a 1 an
Parent
commit
c7a25edb88
1 fichiers modifiés avec 1 ajouts et 5 suppressions
  1. 1 5
      common/src/qfw/util/dataexport/dataexport.go

+ 1 - 5
common/src/qfw/util/dataexport/dataexport.go

@@ -369,12 +369,11 @@ func getDataExportSql(scd *SieveCondition) string {
 								appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
 							}
 						}
-					} else if strings.Contains(vv, " ") {
+					} else {
 						for _, vk := range strings.Split(vv, " ") {
 							if len(vk) == 0 {
 								continue
 							}
-
 							//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
 							if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vk))) == 1 {
 								queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
@@ -384,9 +383,6 @@ func getDataExportSql(scd *SieveCondition) string {
 								appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
 							}
 						}
-					} else {
-						appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vv+"\""))
-
 					}
 					// 单个关键词分词后都包含
 					shoulds = append(shoulds, fmt.Sprintf(query_bool_must_and, strings.Join(appendedShoulds, ","), ""))