Update time_series_query.go

fix alert no data when elasticsearch group by terms size is set to no limit
pull/13609/head
Yuan Liu 7 years ago committed by GitHub
parent 974eddee8f
commit 3b9ab6e204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkg/tsdb/elasticsearch/time_series_query.go

@ -171,6 +171,10 @@ func addTermsAgg(aggBuilder es.AggBuilder, bucketAgg *BucketAgg, metrics []*Metr
} else {
a.Size = 500
}
if a.Size == 0 {
a.Size = 500
}
if minDocCount, err := bucketAgg.Settings.Get("min_doc_count").Int(); err == nil {
a.MinDocCount = &minDocCount
}

Loading…
Cancel
Save