We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mustNot
fmt.Sprintf
1 parent d7f30e8 commit 90b7651Copy full SHA for 90b7651
1 file changed
plugins/alerts/main.go
@@ -2,6 +2,7 @@ package main
2
3
import (
4
"context"
5
+ "fmt"
6
"github.com/threatwinds/go-sdk/catcher"
7
"github.com/threatwinds/go-sdk/opensearch"
8
"github.com/threatwinds/go-sdk/plugins"
@@ -182,7 +183,7 @@ func getPreviousAlertId(alert *plugins.Alert) *string {
182
183
},
184
})
185
- mustNot = append(filters, opensearch.Query{
186
+ mustNot = append(mustNot, opensearch.Query{
187
Exists: map[string]string{
188
"field": "parentId",
189
@@ -197,7 +198,7 @@ func getPreviousAlertId(alert *plugins.Alert) *string {
197
198
if value.Type == gjson.String {
199
filters = append(filters, opensearch.Query{
200
Term: map[string]map[string]interface{}{
- d: {
201
+ fmt.Sprintf("%s.keyword", d): {
202
"value": value.String(),
203
204
0 commit comments