[ML] Fix for audit message search size being 0 when jobs size is 0 (#27955)

This commit is contained in:
James Gowdy 2019-01-03 11:06:50 +00:00 committed by GitHub
parent 398f067104
commit 0232b9b69e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ export function jobAuditMessagesProvider(callWithRequest) {
levelsPerJob: {
terms: {
field: 'job_id',
size: Math.min(maxBuckets, jobAggregationSize)
size: (Math.min(maxBuckets, jobAggregationSize) || 1), // don't allow a value of 0
},
aggs: {
levels: {