fengweiqiang 5 years ago
parent
commit
3ed7bf817e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/util/utiltag.go

+ 8 - 0
src/util/utiltag.go

@@ -404,6 +404,14 @@ func Utiltags(tag map[string]interface{}) string {
 				"bool": torules,
 				"bool": torules,
 			})
 			})
 		}
 		}
+	}else if len(torules.Should) > 0 {
+		if QueryObjecct.Filtered.Query == nil{
+			QueryObjecct.Filtered.Query = &models.Query{}
+			QueryObjecct.Filtered.Query.Bool = &fqBoolObject
+		}
+		QueryObjecct.Filtered.Query.Bool.Must = append(QueryObjecct.Filtered.Query.Bool.Must, map[string]interface{}{
+			"bool": torules,
+		})
 	}
 	}
 	rdata := make(map[string]interface{})
 	rdata := make(map[string]interface{})
 	rdata["query"] = QueryObjecct
 	rdata["query"] = QueryObjecct