wangchuanjin 2 ani în urmă
părinte
comite
f6a6746c46
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      esv1/elasticutil.go

+ 3 - 0
esv1/elasticutil.go

@@ -311,6 +311,9 @@ var SR = strings.Replace
 func MakeQuery(query, order, fileds string, start, limit int) string {
 	res := AnalyQuery(query, "", QStr)
 	if len(res) > 10 {
+		if strings.Contains(res, "###剑鱼###") {
+			res = strings.ReplaceAll(res, "###剑鱼###", "\\\"")
+		}
 		res = SR(SR(SR(SR(res, ",$and", "", -1), "$and", "", -1), ",$or", "", -1), "$or", "", -1)
 		if len(fileds) > 0 {
 			//"_source":["account_number","balance"]