From 400a9704f41dd88cdb7cbe29ac6691699e8e768c Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 20 Apr 2021 10:44:04 +0200 Subject: [PATCH] aggregate citation years --- app/models/event.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/event.rb b/app/models/event.rb index 381475411..16f32b98b 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -263,6 +263,7 @@ def self.query_aggregations }, min_doc_count: 1, }, + aggs: { bucket_truncate: { bucket_sort: { size: 10 } } }, }, registrants: { terms: { field: "registrant_id", size: 10, min_doc_count: 1 },