Commit 91a814d2 by Torkel Ödegaard

Merge pull request #3017 from volter/master

"No limit" was not effective for ES terms aggregation
parents 6fe6a33d 6b9b08da
......@@ -15,15 +15,14 @@ function (angular) {
};
ElasticQueryBuilder.prototype.buildTermsAgg = function(aggDef, queryNode, target) {
var metricRef, metric, size, y;
var metricRef, metric, y;
queryNode.terms = { "field": aggDef.field };
if (!aggDef.settings) {
return queryNode;
}
size = parseInt(aggDef.settings.size, 10);
if (size > 0) { queryNode.terms.size = size; }
queryNode.terms.size = parseInt(aggDef.settings.size, 10);
if (aggDef.settings.orderBy !== void 0) {
queryNode.terms.order = {};
queryNode.terms.order[aggDef.settings.orderBy] = aggDef.settings.order;
......
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