xuzhiheng před 2 roky
rodič
revize
698dd96344
1 změnil soubory, kde provedl 9 přidání a 1 odebrání
  1. 9 1
      src/util/utiltag.go

+ 9 - 1
src/util/utiltag.go

@@ -893,7 +893,15 @@ func Utiltags(tag map[string]interface{}) string {
 		if QueryObjecct.Bool == nil {
 			QueryObjecct.Bool = &fqBoolObject
 		} else {
-			QueryObjecct.Bool.Must = append(QueryObjecct.Bool.Must, &fqBoolObject)
+			if fqBoolObject.Must != nil {
+				QueryObjecct.Bool.Must = append(QueryObjecct.Bool.Must, fqBoolObject.Must...)
+			}
+			if fqBoolObject.Should != nil {
+				QueryObjecct.Bool.Should = append(QueryObjecct.Bool.Should, fqBoolObject.Should...)
+			}
+			if fqBoolObject.MustNot != nil {
+				QueryObjecct.Bool.MustNot = append(QueryObjecct.Bool.MustNot, fqBoolObject.MustNot...)
+			}
 		}
 		if len(torules.Should) > 0 {
 			QueryObjecct.Bool.Must = append(QueryObjecct.Bool.Must, map[string]interface{}{