Skip to content

Commit

Permalink
fix 400 error on initial signals search
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Jul 2, 2020
1 parent 335c9bb commit e15a263
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const buildLastAlertsQuery = (ruleId: string | undefined | null) => {
bool: { should: [{ match: { 'signal.status': 'open' } }], minimum_should_match: 1 },
},
];

return {
aggs: {
lastSeen: { max: { field: '@timestamp' } },
Expand All @@ -30,7 +31,7 @@ export const buildLastAlertsQuery = (ruleId: string | undefined | null) => {
: queryFilter,
},
},
size: 0,
size: 1,
track_total_hits: true,
};
};

0 comments on commit e15a263

Please sign in to comment.