Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add contents and contents_note to the dropdown title search #103

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,47 +331,34 @@ class CatalogController < ApplicationController
}
end

# URSUS
unless Flipflop.sinai?
config.add_search_field('title_tesim', label: 'Title') do |field|
field.solr_parameters = {
qf: 'title_tesim',
pf: ''
}
end
config.add_search_field('subject_tesim', label: 'Subject') do |field|
field.solr_parameters = {
qf: 'subject_tesim',
pf: ''
}
end
end

# SINAI
config.add_search_field('shelfmark_tsi', label: 'Shelfmark') do |field|
field.solr_parameters = {
qf: 'shelfmark_tsi',
pf: ''
}
end
config.add_search_field('title_tesim descriptive_title_tesim alternative_title_tesim uniform_title_tesim', label: 'Title') do |field|

config.add_search_field('title_tesim descriptive_title_tesim contents_ssi contents_note_tesim alternative_title_tesim uniform_title_tesim', label: 'Title') do |field|
field.solr_parameters = {
qf: 'title_tesim descriptive_title_tesim alternative_title_tesim uniform_title_tesim',
qf: 'title_tesim descriptive_title_tesim contents_ssi contents_note_tesim alternative_title_tesim uniform_title_tesim',
pf: ''
}
end

config.add_search_field('author_tesim scribe_tesim associated_name_tesim translator_tesim', label: 'Names') do |field|
field.solr_parameters = {
qf: 'author_tesim scribe_tesim associated_name_tesim translator_tesim',
pf: ''
}
end

config.add_search_field('incipit_tesim explicit_tesim', label: 'Incipit/Explicit') do |field|
field.solr_parameters = {
qf: 'incipit_tesim explicit_tesim',
pf: ''
}
end

config.add_search_field('toc_tesim contents_note_tesim contents_ssi', label: 'Contents') do |field|
field.solr_parameters = {
qf: 'toc_tesim contents_note_tesim contents_ssi',
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/e2e/sinai_search.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Sinai Search', () => {

it('Search Title Found', () => {
cy.get('[id=q]').type('sinai');
cy.get('select').select('Title').should('have.value', 'title_tesim descriptive_title_tesim alternative_title_tesim uniform_title_tesim');
cy.get('select').select('Title').should('have.value', 'title_tesim descriptive_title_tesim contents_ssi contents_note_tesim alternative_title_tesim uniform_title_tesim');
cy.get('[id=search]').click();
cy.get('.search-count__heading').contains('Catalog Results');
cy.percySnapshot();
Expand Down