diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 4f1f59f2a..7ae79a30f 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -105,6 +105,7 @@ def index state: params[:state], year: params[:year], created: params[:created], + registered: params[:registered], provider_id: params[:provider_id], client_id: params[:client_id], prefix: params[:prefix], diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 25fa5d2eb..93c4b1458 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -120,6 +120,7 @@ def query(query, options={}) must << { term: { prefix: options[:prefix] }} if options[:prefix].present? must << { term: { "author.id" => "https://orcid.org/#{options[:person_id]}" }} if options[:person_id].present? must << { range: { created: { gte: "#{options[:created].split(",").min}||/y", lte: "#{options[:created].split(",").max}||/y", format: "yyyy" }}} if options[:created].present? + must << { range: { registered: { gte: "#{options[:registered].split(",").min}||/y", lte: "#{options[:registered].split(",").max}||/y", format: "yyyy" }}} if options[:registered].present? must << { term: { schema_version: "http://datacite.org/schema/kernel-#{options[:schema_version]}" }} if options[:schema_version].present? must << { term: { source: options[:source] }} if options[:source].present?