mlibrary / heliotrope

Codebase for Fulcrum, a Samvera-based digital publishing platform built by the University of Michigan Library

Home Page:https://fulcrum.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Press parameter in caps breaks monograph search

conorom opened this issue · comments

Entering a URL like /NYUPRESS seems to not return any monographs, at least for some presses/publishers. Probably this search term should be forced to lowercase in the PressSearchBuilder before sending the query to Solr.

Maybe just change this:

https://github.com/mlibrary/heliotrope/blob/master/app/models/press_search_builder.rb#L10

solr_parameters[:fq] << "{!terms f=press_sim}#{all_presses.join(',')}"

to this:

solr_parameters[:fq] << "{!terms f=press_sim}#{all_presses.map(&:downcase).join(',')}"

Might work...