Skip to content

Commit

Permalink
[Security Solution][Alerts] Don't use maxSignals for topHits agg size (
Browse files Browse the repository at this point in the history
…elastic#146564)

## Summary

Addresses elastic#146494

We only need the first document from the bucket to create the alert, not
`maxSignals` documents. If `maxSignals` was greater than 100, this
caused an error in the search.
  • Loading branch information
marshallmain authored Nov 30, 2022
1 parent 9ad78b2 commit d659ee6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const buildGroupByFieldAggregation = ({
aggs: {
topHits: {
top_hits: {
size: maxSignals,
size: 1,
sort: [
{
[aggregatableTimestampField]: {
Expand Down

0 comments on commit d659ee6

Please sign in to comment.