Skip to content

Commit

Permalink
Added document _id as param for terms query when searching alerts by … (
Browse files Browse the repository at this point in the history
opensearch-project#753) (opensearch-project#760)

* Added document _id as param for terms query when searching alerts by their ids

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>

* Empty-Commit

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
  • Loading branch information
stevanbz authored Jan 17, 2023
1 parent 47ac381 commit 61ce7d9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class TransportGetAlertsAction @Inject constructor(
queryBuilder.filter(QueryBuilders.termQuery("state", getAlertsRequest.alertState))

if (getAlertsRequest.alertIds.isNullOrEmpty() == false) {
queryBuilder.filter(QueryBuilders.termsQuery("id", getAlertsRequest.alertIds))
queryBuilder.filter(QueryBuilders.termsQuery("_id", getAlertsRequest.alertIds))
}

if (getAlertsRequest.monitorId != null) {
Expand Down

0 comments on commit 61ce7d9

Please sign in to comment.