File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
alerting/src/main/kotlin/org/opensearch/alerting/transport Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ class TransportSearchMonitorAction @Inject constructor(
5555 val searchSourceBuilder = searchMonitorRequest.searchRequest.source()
5656 .seqNoAndPrimaryTerm(true )
5757 .version(true )
58- val queryBuilder = QueryBuilders .boolQuery().must(searchSourceBuilder.query())
58+ val queryBuilder = if (searchSourceBuilder.query() == null ) BoolQueryBuilder ()
59+ else QueryBuilders .boolQuery().must(searchSourceBuilder.query())
5960
6061 // The SearchMonitor API supports one 'index' parameter of either the SCHEDULED_JOBS_INDEX or ALL_ALERT_INDEX_PATTERN.
6162 // When querying the ALL_ALERT_INDEX_PATTERN, we don't want to check whether the MONITOR_TYPE field exists
You can’t perform that action at this time.
0 commit comments