Skip to content

Commit

Permalink
Merge pull request #86 from mlibrary/LIBSEARCH-856-update-links-from-…
Browse files Browse the repository at this point in the history
…subject-browse-to-catalog-search-to-use-lc-subject-starts-with-fielded-search

[LIBSEARCH-856] Update links from Subject Browse to Catalog Search to use "LC Subject starts with" fielded search
  • Loading branch information
erinesullivan authored May 16, 2023
2 parents f1f4248 + 82081f4 commit 48f5869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/models/subject_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def subject
end

def url
params = {library: "U-M Ann Arbor Libraries", query: "subject:(\"#{subject}\")", "filter.search_only": false}
params = {library: "U-M Ann Arbor Libraries", query: "lc_subject_starts_with:(\"#{subject}\")", "filter.search_only": false}
"https://search.lib.umich.edu/catalog?#{URI.encode_www_form(params)}"
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/subject_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
expect(subject.has_cross_references?).to eq(false)
end
it "returns the expected url" do
expect(subject.url).to include("query=#{URI.encode_www_form_component("subject:(\"Civil war\")")}&filter.search_only=false")
expect(subject.url).to include("query=#{URI.encode_www_form_component("lc_subject_starts_with:(\"Civil war\")")}&filter.search_only=false")
end
end
end
Expand Down

0 comments on commit 48f5869

Please sign in to comment.