diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 99e947750..440456ab0 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -121,6 +121,7 @@ def index person_id: params[:person_id], resource_type_id: params[:resource_type_id], schema_version: params[:schema_version], + subject: params[:subject], link_check_status: params[:link_check_status], link_check_has_schema_org: params[:link_check_has_schema_org], link_check_body_has_pid: params[:link_check_body_has_pid], diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 7f282cc4b..93744832e 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -124,6 +124,7 @@ def query(query, options={}) 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 << { term: { schema_version: "http://datacite.org/schema/kernel-#{options[:schema_version]}" }} if options[:schema_version].present? + must << { terms: { "subjects.subject": options[:subject].split(",") }} if options[:subject].present? must << { term: { source: options[:source] }} if options[:source].present? must << { term: { "landing_page.status": options[:link_check_status] }} if options[:link_check_status].present? must << { exists: { field: "landing_page.checked" }} if options[:link_checked].present?