|
@@ -314,6 +314,9 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
|
if mustquery != "" {
|
|
|
musts = append(musts, mustquery)
|
|
|
}
|
|
|
+ //搜索范围是否只有附件
|
|
|
+ //搜索范围只选择附件,是否有附件条件无效;
|
|
|
+ var isFileSearch bool = in.SelectType == "filetext"
|
|
|
selectTypeArr := strings.Split(in.SelectType, ",")
|
|
|
var findfields string
|
|
|
if selectTypeArr == nil || len(selectTypeArr) == 0 {
|
|
@@ -321,12 +324,8 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
|
} else {
|
|
|
findfields = fmt.Sprintf(`"%s"`, strings.Join(selectTypeArr, "\",\""))
|
|
|
}
|
|
|
- var isFileSearch bool = false //搜索范围是否有附件选择
|
|
|
//此时关键词中间有+进行隔离
|
|
|
if in.KeyWords != "" {
|
|
|
- if strings.Contains(findfields, "filetext") { //搜索范围选择附件,是否有附件条件无效;
|
|
|
- isFileSearch = true
|
|
|
- }
|
|
|
shoulds := []string{}
|
|
|
var switchBool = strings.Contains(findfields, "detail") && strings.Contains(findfields, "title") && IC.C.SearchTypeSwitch
|
|
|
for _, v := range strings.Split(in.KeyWords, "+") {
|