Skip to content

Commit

Permalink
show registration date in doi aggregations
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 14, 2018
1 parent 08bd325 commit f260c48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def index
resource_types = total > 0 ? facet_by_resource_type(response.response.aggregations.resource_types.buckets) : nil
years = total > 0 ? facet_by_year(response.response.aggregations.years.buckets) : nil
created = total > 0 ? facet_by_year(response.response.aggregations.created.buckets) : nil
registered = total > 0 ? facet_by_year(response.response.aggregations.registered.buckets) : nil
providers = total > 0 ? facet_by_provider(response.response.aggregations.providers.buckets) : nil
clients = total > 0 ? facet_by_client(response.response.aggregations.clients.buckets) : nil
prefixes = total > 0 ? facet_by_key(response.response.aggregations.prefixes.buckets) : nil
Expand All @@ -140,6 +141,7 @@ def index
resource_types: resource_types,
years: years,
created: created,
registered: registered,
providers: providers,
clients: clients,
prefixes: prefixes,
Expand Down
1 change: 1 addition & 0 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def self.query_aggregations
states: { terms: { field: 'aasm_state', size: 10, min_doc_count: 1 } },
years: { date_histogram: { field: 'published', interval: 'year', min_doc_count: 1 } },
created: { date_histogram: { field: 'created', interval: 'year', min_doc_count: 1 } },
registered: { date_histogram: { field: 'registered', interval: 'year', min_doc_count: 1 } },
providers: { terms: { field: 'provider_id', size: 10, min_doc_count: 1 } },
clients: { terms: { field: 'client_id', size: 10, min_doc_count: 1 } },
prefixes: { terms: { field: 'prefix', size: 10, min_doc_count: 1 } },
Expand Down

0 comments on commit f260c48

Please sign in to comment.