|
@@ -361,6 +361,14 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
|
if strings.Contains(findfields, "filetext") { //搜索范围选择附件,是否有附件条件无效;
|
|
|
isFileSearch = true
|
|
|
}
|
|
|
+ //标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)
|
|
|
+ if strings.Contains(findfields, "detail") && strings.Contains(findfields, "title") && IC.C.SearchTypeSwitch {
|
|
|
+ if strings.Contains(findfields, "title,") {
|
|
|
+ findfields = strings.Replace(findfields, "title,", "", -1)
|
|
|
+ } else if strings.Contains(findfields, ",title") {
|
|
|
+ findfields = strings.Replace(findfields, ",title", "", -1)
|
|
|
+ }
|
|
|
+ }
|
|
|
keyword_multi_match := fmt.Sprintf(multi_match, "%s", findfields)
|
|
|
shoulds := []string{}
|
|
|
for _, v := range strings.Split(in.KeyWords, "+") {
|