diff --git a/Gemfile.lock b/Gemfile.lock index affe604f2..03b1cae13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -102,7 +102,7 @@ GEM latex-decode (~> 0.0) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) - bolognese (1.5.16) + bolognese (1.5.17) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) diff --git a/app/models/doi.rb b/app/models/doi.rb index e7ebf824a..1fd62c31f 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -527,8 +527,35 @@ def self.query_aggregations { resource_types: { terms: { field: 'resource_type_id_and_name', size: 16, min_doc_count: 1 } }, states: { terms: { field: 'aasm_state', size: 3, min_doc_count: 1 } }, - years: { date_histogram: { field: 'publication_year', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 }, - aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } }, + years: { + # filter: { + # range: { + # "publication_year": { + # "gte": "2000" + # } + # } + # }, + # aggs: { + # published: { + date_histogram: { + field: 'publication_year', + interval: 'year', + format: 'year', + order: { + _key: "desc" + }, + min_doc_count: 1 + }, + # aggs: { + # bucket_truncate: { + # bucket_sort: { + # size: 10 + # } + # } + # } + # } + # } + }, registration_agencies: { terms: { field: 'agency', size: 10, min_doc_count: 1 } }, created: { date_histogram: { field: 'created', interval: 'year', format: 'year', order: { _key: "desc" }, min_doc_count: 1 }, aggs: { bucket_truncate: { bucket_sort: { size: 10 } } } },