Skip to content

Commit

Permalink
include sum_year_distribution variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 8, 2019
1 parent bc37348 commit dcb4096
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,15 @@ def self.query_fields
def self.query_aggregations
sum_distribution = {
sum_bucket: {
buckets_path: "year_months>total_by_year_month"
}
buckets_path: "year_months>total_by_year_month"
}
}

sum_year_distribution = {
sum_bucket: {
buckets_path: "years>total_by_year"
}
}

{
sources: { terms: { field: 'source_id', size: 50, min_doc_count: 1 } },
Expand Down

0 comments on commit dcb4096

Please sign in to comment.