Skip to content

Commit

Permalink
Merge pull request #1293 from sul-dlss/1244-search-config-defaults
Browse files Browse the repository at this point in the history
Remove Callnumber and Full text from default exhibit Search config
  • Loading branch information
cbeer committed Dec 4, 2018
2 parents dab6e0e + 90f7c0b commit b67a9e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added
### Changed
- Remove "Call number" and "Full text" from default search fields for new exhibits #1293
### Deprecated
### Removed
### Fixed
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class CatalogController < ApplicationController
field.solr_parameters = {
df: 'callnum_search'
}
field.enabled = false
end

config.add_search_field('full_text') do |field|
Expand All @@ -305,6 +306,7 @@ class CatalogController < ApplicationController
pf3: '${pf3_full_text}',
pf2: '${pf2_full_text}'
}
field.enabled = false
end

config.add_search_field('table_of_contents') do |field|
Expand Down
4 changes: 3 additions & 1 deletion spec/features/exhibit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
visit '/'
end

it 'has working full text fielded search' do
it 'can enable full text fielded search' do
exhibit.blacklight_configuration.search_fields['full_text'] = { enabled: true }
exhibit.blacklight_configuration.save
visit spotlight.url_for(exhibit)
fill_in 'q', with: 'cobbler'
select 'Full text', from: 'search_field'
Expand Down

0 comments on commit b67a9e5

Please sign in to comment.