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?