diff --git a/public/app/plugins/datasource/elasticsearch/datasource.ts b/public/app/plugins/datasource/elasticsearch/datasource.ts index aae00c6cde4..12ed6889243 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.ts +++ b/public/app/plugins/datasource/elasticsearch/datasource.ts @@ -801,6 +801,9 @@ export class ElasticDatasource if (target.bucketAggs) { for (const bucketAgg of target.bucketAggs) { + if (bucketAgg.type !== 'filters' && this.templateSrv.containsTemplate(bucketAgg.field)) { + return true; + } if (this.objectContainsTemplate(bucketAgg.settings)) { return true; }