From 135b83e17f8def56529815a34dfda2117e1655f0 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Thu, 5 Nov 2020 07:26:19 -0700 Subject: [PATCH] Elasticsearch: Filter pipeline aggregations from order by options (#28620) --- public/app/plugins/datasource/elasticsearch/query_def.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/elasticsearch/query_def.ts b/public/app/plugins/datasource/elasticsearch/query_def.ts index 56720e80847..43295c6a0fb 100644 --- a/public/app/plugins/datasource/elasticsearch/query_def.ts +++ b/public/app/plugins/datasource/elasticsearch/query_def.ts @@ -246,7 +246,7 @@ export function getMovingAvgSettings(model: any, filtered: boolean) { export function getOrderByOptions(target: any) { const metricRefs: any[] = []; _.each(target.metrics, metric => { - if (metric.type !== 'count') { + if (metric.type !== 'count' && !isPipelineAgg(metric.type)) { metricRefs.push({ text: describeMetric(metric), value: metric.id }); } });