wangchuanjin 2 năm trước cách đây
mục cha
commit
f6a6746c46
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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 {
 func MakeQuery(query, order, fileds string, start, limit int) string {
 	res := AnalyQuery(query, "", QStr)
 	res := AnalyQuery(query, "", QStr)
 	if len(res) > 10 {
 	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)
 		res = SR(SR(SR(SR(res, ",$and", "", -1), "$and", "", -1), ",$or", "", -1), "$or", "", -1)
 		if len(fileds) > 0 {
 		if len(fileds) > 0 {
 			//"_source":["account_number","balance"]
 			//"_source":["account_number","balance"]