Skip to content

Commit

Permalink
Merge pull request #9 from MissionCriticalCloud/fix/aggregation-limiting
Browse files Browse the repository at this point in the history
[FIX] Aggregation Limiting
  • Loading branch information
Boris Schrijver authored Mar 1, 2017
2 parents 6c1b8fc + 560e305 commit de5f10e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public SearchResult search(final DateTime from, final DateTime to) throws NoMetr
)
.must(termQuery("resourceType", "VirtualMachine"))
)
.addAggregation(terms("domains").field("domainUuid")
.subAggregation(terms("resources").field("resourceUuid")
.subAggregation(terms("states").field("payload.state")
.addAggregation(terms("domains").field("domainUuid").size(250)
.subAggregation(terms("resources").field("resourceUuid").size(2500)
.subAggregation(terms("states").field("payload.state").size(2)
.subAggregation(avg("cpuAverage").field("payload.cpu"))
.subAggregation(avg("memoryAverage").field("payload.memory"))
)
Expand Down

0 comments on commit de5f10e

Please sign in to comment.