|
@@ -1128,6 +1128,7 @@ func GetResForJY(index, itype string, keys []KeyConfig, allquery, findfields, So
|
|
|
if len(keys) > 0 {
|
|
|
qstr := ""
|
|
|
new_minq := fmt.Sprintf(minq, "%s", findfields)
|
|
|
+ not_new_minq := fmt.Sprintf(minq, "%s", `"title"`) //排除词只查询标题
|
|
|
musts := []string{}
|
|
|
for _, qs_words := range keys {
|
|
|
mq := []string{}
|
|
@@ -1136,7 +1137,7 @@ func GetResForJY(index, itype string, keys []KeyConfig, allquery, findfields, So
|
|
|
mq = append(mq, fmt.Sprintf(new_minq, ReplaceYH(qs_word)))
|
|
|
}
|
|
|
for _, qs_word := range qs_words.NotKeys {
|
|
|
- notmq = append(notmq, fmt.Sprintf(new_minq, ReplaceYH(qs_word)))
|
|
|
+ notmq = append(notmq, fmt.Sprintf(not_new_minq, ReplaceYH(qs_word)))
|
|
|
}
|
|
|
if len(qs_words.Areas) > 0 {
|
|
|
mq = append(mq, fmt.Sprintf(`{"terms":{"area":["%s"]}}`, strings.Join(qs_words.Areas, `","`)))
|