Skip to content

Commit

Permalink
fix field of science filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 5, 2020
1 parent b80c967 commit 19baf42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 19baf42

Please sign in to comment.