Skip to content

Commit

Permalink
allow parent aggs to have sub aggs defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Feb 7, 2017
1 parent c8eda0d commit 416dfb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ui/public/vis/agg_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export default function AggConfigFactory(Private, fieldTypeFilter) {
configDsl[this.type.dslName || this.type.name] = output.params;

// if the config requires subAggs, write them to the dsl as well
if (this.subAggs && !output.subAggs) output.subAggs = this.subAggs;
if (output.subAggs) {
const subDslLvl = configDsl.aggs || (configDsl.aggs = {});
output.subAggs.forEach(function nestAdhocSubAggs(subAggConfig) {
Expand Down

0 comments on commit 416dfb1

Please sign in to comment.