diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index 4d1b26708..a5ed81554 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -114,8 +114,18 @@ def query(query, options={}) # currently not used # fields = options[:query_fields].presence || query_fields + # make sure field name uses underscore # escape forward slashes in query - query = query.gsub("/", '\/') if query.present? + if query.present? + query = query.gsub(/publicationYear/, "publication_year") + query = query.gsub(/relatedIdentifiers/, "related_identifiers") + query = query.gsub(/rightsList/, "rights_list") + query = query.gsub(/fundingReferences/, "funding_references") + query = query.gsub(/geoLocations/, "geo_locations") + query = query.gsub(/landingPage/, "landing_page") + query = query.gsub(/contentUrl/, "content_url") + query = query.gsub("/", '\/') + end must = [] must << { query_string: { query: query }} if query.present? diff --git a/config/initializers/_version.rb b/config/initializers/_version.rb index 8043845fe..0649c1ca5 100644 --- a/config/initializers/_version.rb +++ b/config/initializers/_version.rb @@ -1,5 +1,5 @@ module Lupo class Application - VERSION = "2.3.1" + VERSION = "2.3.2" end end \ No newline at end of file