|
@@ -369,7 +369,7 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
if len([]rune(elastic.ReplaceYH(v))) == 1 {
|
|
if len([]rune(elastic.ReplaceYH(v))) == 1 {
|
|
//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail 搜索的时候加上标题
|
|
//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail 搜索的时候加上标题
|
|
if DetailFileORTitle(findfields) {
|
|
if DetailFileORTitle(findfields) {
|
|
- keyword_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`"title"`)
|
|
|
|
|
|
+ keyword_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`,"title"`)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
//标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
|
|
//标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
|
|
@@ -453,7 +453,7 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
if len([]rune(elastic.ReplaceYH(v))) == 1 {
|
|
if len([]rune(elastic.ReplaceYH(v))) == 1 {
|
|
//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail 搜索的时候加上标题
|
|
//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail 搜索的时候加上标题
|
|
if DetailFileORTitle(findfields) {
|
|
if DetailFileORTitle(findfields) {
|
|
- notkey_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`"title"`)
|
|
|
|
|
|
+ notkey_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`,"title"`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
notkey_must_not = append(notkey_must_not, fmt.Sprintf(notkey_multi_match, elastic.ReplaceYH(v)))
|
|
notkey_must_not = append(notkey_must_not, fmt.Sprintf(notkey_multi_match, elastic.ReplaceYH(v)))
|