|
@@ -251,17 +251,25 @@ func getDataExportSql(scd *SieveCondition) string {
|
|
|
scd.Keyword = []KeyWord{KeyWordSearch}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
for _, v := range scd.Keyword {
|
|
|
shoulds := []string{}
|
|
|
must_not := []string{}
|
|
|
- //附加词
|
|
|
+
|
|
|
if v.Keyword != "" {
|
|
|
- for _, vk := range strings.Split(v.Keyword, " ") {
|
|
|
- shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vk+"\""))
|
|
|
+ if strings.Contains(scd.Keyword[0].Keyword, "+") {
|
|
|
+ for _, vk := range strings.Split(v.Keyword, "+") {
|
|
|
+ shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vk+"\""))
|
|
|
+ }
|
|
|
+ } else if strings.Contains(scd.Keyword[0].Keyword, " ") {
|
|
|
+ for _, vk := range strings.Split(v.Keyword, " ") {
|
|
|
+ shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vk+"\""))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+scd.Keyword[0].Keyword+"\""))
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //附加词
|
|
|
for _, vv := range v.Appended {
|
|
|
shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vv+"\""))
|
|
|
}
|