From e1739b602509741ad2c549a045b326fbc22fb5f3 Mon Sep 17 00:00:00 2001 From: Uros Meglic Date: Wed, 12 Oct 2016 13:14:57 +0200 Subject: [PATCH] (fix)elasticsearch: IP addresses don't survive terms aggregation (#4393) (#6246) --- .../app/plugins/datasource/elasticsearch/elastic_response.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/plugins/datasource/elasticsearch/elastic_response.js b/public/app/plugins/datasource/elasticsearch/elastic_response.js index a099aa1a012..4e82a280024 100644 --- a/public/app/plugins/datasource/elasticsearch/elastic_response.js +++ b/public/app/plugins/datasource/elasticsearch/elastic_response.js @@ -171,6 +171,9 @@ function (_, queryDef) { } else { props["filter"] = nameIndex; } + if (bucket.key_as_string) { + props[aggDef.field] = bucket.key_as_string; + } this.processBuckets(bucket, target, seriesList, docs, props, depth+1); } }