From 0e03bcbb31ed247c6505fc508200930763646a3e Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 20 Apr 2021 11:03:39 +0200 Subject: [PATCH] fix citation_year facet --- app/controllers/events_controller.rb | 2 +- app/controllers/old_events_controller.rb | 2 +- app/models/event.rb | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 98f1ae7f2..54bf98e53 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -183,7 +183,7 @@ def index end citation_years = if total.positive? - facet_by_year(response.response.aggregations.citation_years.buckets) + facet_annual(response.response.aggregations.citation_years.buckets) end prefixes = if total.positive? diff --git a/app/controllers/old_events_controller.rb b/app/controllers/old_events_controller.rb index 1a5dae147..8be6be5ba 100644 --- a/app/controllers/old_events_controller.rb +++ b/app/controllers/old_events_controller.rb @@ -178,7 +178,7 @@ def index end citation_years = if total > 0 - facet_by_year(response.aggregations.citation_years.buckets) + facet_annual(response.aggregations.citation_years.buckets) end citation_types = if total > 0 diff --git a/app/models/event.rb b/app/models/event.rb index 16f32b98b..381475411 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -263,7 +263,6 @@ 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 },