|
@@ -667,21 +667,26 @@ func method2(newEsObject sql.NewEsObject, keyword, keymatch string, tmps []strin
|
|
|
}
|
|
|
log.Println("+++++++", tmps, keymatch)
|
|
|
if len(tmps) == 1 && (strings.Contains(keymatch, "6") || strings.Contains(keymatch, "7")) {
|
|
|
- notkeyline := []interface{}{}
|
|
|
+ var notkeyline interface{}
|
|
|
if tmps[0] == "buyer" {
|
|
|
- notkeyline = append(notkeyline, sql.BuyerMatch{
|
|
|
+ // notkeyline = append(notkeyline, sql.BuyerMatch{
|
|
|
+ // Buyer: &sql.Buyer{Buyer: notKeyWordArr},
|
|
|
+ // })
|
|
|
+ notkeyline = sql.BuyerMatch{
|
|
|
Buyer: &sql.Buyer{Buyer: notKeyWordArr},
|
|
|
- })
|
|
|
-
|
|
|
+ }
|
|
|
//toptypeSubtype := sql.ToptypeSubtype{}
|
|
|
//toptypeSubtype.Toptype = strings.Split(tab.Stoptype, ",")
|
|
|
//ffBoolObject.Must = append(ffBoolObject.Must, sql.ToptypeSubtypeMust{&toptypeSubtype})
|
|
|
} else if tmps[0] == "s_winner" {
|
|
|
- notkeyline = append(notkeyline, sql.WinnerMatch{
|
|
|
+ // notkeyline = append(notkeyline, sql.WinnerMatch{
|
|
|
+ // Winner: &sql.Winner{Winner: notKeyWordArr},
|
|
|
+ // })
|
|
|
+ notkeyline = sql.WinnerMatch{
|
|
|
Winner: &sql.Winner{Winner: notKeyWordArr},
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
- if len(notkeyline) > 0 {
|
|
|
+ if notkeyline != nil {
|
|
|
newEsObject.Bool.MustNot = append(newEsObject.Bool.MustNot, notkeyline)
|
|
|
}
|
|
|
}
|