You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/03/17 04:42:22 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #4529: [hotfix] Fix AlarmQuery query condition issue

kezhenxu94 commented on a change in pull request #4529: [hotfix] Fix AlarmQuery query condition issue
URL: https://github.com/apache/skywalking/pull/4529#discussion_r393441777
 
 

 ##########
 File path: oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/query/AlarmQuery.java
 ##########
 @@ -64,7 +64,7 @@ public Alarms getAlarm(Integer scopeId, String keyword, int limit, int from, lon
                        .and(lte(InfluxClient.TIME, InfluxClient.timeInterval(endTB)));
         }
         if (!Strings.isNullOrEmpty(keyword)) {
-            recallQuery.and(regex(AlarmRecord.ALARM_MESSAGE, keyword));
+            recallQuery.and(contains(AlarmRecord.ALARM_MESSAGE, keyword.replaceAll("/", "\\/")));
 
 Review comment:
   ```suggestion
               recallQuery.and(contains(AlarmRecord.ALARM_MESSAGE, keyword.replaceAll("/", "\\\\/")));
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services