Commit 010dbddf by Alexander Akulov Committed by Torkel Ödegaard

Fix double slashes in POST request to ES (#5536)

parent 3f83bf6e
...@@ -256,7 +256,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes ...@@ -256,7 +256,7 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
esQuery = esQuery.replace(/\$timeTo/g, range.to.valueOf()); esQuery = esQuery.replace(/\$timeTo/g, range.to.valueOf());
esQuery = header + '\n' + esQuery + '\n'; esQuery = header + '\n' + esQuery + '\n';
return this._post('/_msearch?search_type=count', esQuery).then(function(res) { return this._post('_msearch?search_type=count', esQuery).then(function(res) {
var buckets = res.responses[0].aggregations["1"].buckets; var buckets = res.responses[0].aggregations["1"].buckets;
return _.map(buckets, function(bucket) { return _.map(buckets, function(bucket) {
return {text: bucket.key, value: bucket.key}; return {text: bucket.key, value: bucket.key};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment