From cd0abbffc3f959f94d072976129028103b6e3fe0 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Thu, 10 Oct 2019 22:34:40 +0200 Subject: [PATCH] use ror url. #348 --- app/models/concerns/indexable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index e9e22da5b..78070aed1 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -203,7 +203,7 @@ def query(query, options={}) must << { terms: { aasm_state: options[:state].to_s.split(",") }} if options[:state].present? must << { range: { registered: { gte: "#{options[:registered].split(",").min}||/y", lte: "#{options[:registered].split(",").max}||/y", format: "yyyy" }}} if options[:registered].present? must << { term: { "creators.nameIdentifiers.nameIdentifier" => "https://orcid.org/#{options[:user_id]}" }} if options[:user_id].present? - must << { term: { "creators.affiliation.affiliationIdentifier" => "https://#{options[:affiliation_id]}" }} if options[:affiliation_id].present? + must << { term: { "creators.affiliation.affiliationIdentifier" => URI.decode(options[:affiliation_id]) }} if options[:affiliation_id].present? must << { term: { consortium_id: options[:consortium_id] }} if options[:consortium_id].present? must << { term: { "client.re3data_id" => options[:re3data_id].upcase.gsub("/", '\/') }} if options[:re3data_id].present? must << { term: { "client.opendoar_id" => options[:opendoar_id] }} if options[:opendoar_id].present?