Ver Fonte

interpolate 'field' again in Elasticsearch terms queries (#10026)

* interpolate 'field' again in Elasticsearch terms queries

Fix for #8662 which was regressed in commit e4950c2dc1012cb1a36cca947666244417e56194 (the field 'field' was no longer interpolated)

* remove unnecessary check for existence of field 'field'
Andrew Richards há 7 anos atrás
pai
commit
3095dabe3c

+ 1 - 0
public/app/plugins/datasource/elasticsearch/datasource.ts

@@ -395,6 +395,7 @@ export class ElasticDatasource {
     }
 
     if (query.find === 'terms') {
+      query.field = this.templateSrv.replace(query.field, {}, 'lucene');
       query.query = this.templateSrv.replace(query.query || '*', {}, 'lucene');
       return this.getTerms(query);
     }