From 19baf420a80d2c010a25940ce4de04264613abbb Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 5 Jun 2020 23:41:33 +0200 Subject: [PATCH] fix field of science filter --- app/models/doi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index d7157d111..2f6dcd529 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -796,7 +796,7 @@ def self.query(query, options={}) end if options[:field_of_science].present? filter << { term: { "subjects.subjectScheme": "Fields of Science and Technology (FOS)" } } - filter << { terms: { "subjects.subject": "FOS: " + options[:field_of_science].split(",").map(&:humanize) } } + filter << { terms: { "subjects.subject": options[:field_of_science].split(",").map { |s| "FOS: " + s.humanize } } } end filter << { term: { source: options[:source] } } if options[:source].present? filter << { range: { reference_count: { "gte": options[:has_references].to_i } } } if options[:has_references].present?