@@ -, +, @@ fields RequireChoosingExistingAuthority - don't require AutoCreateAuthorities - don't generate CatalogModuleRelink - Do LinkerKeepStale - Don't LinkerModule - default LinkerRelink - do --- C4/Heading/MARC21.pm | 2 +- t/db_dependent/Heading.t | 3 --- t/db_dependent/Heading_MARC21.t | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) --- a/C4/Heading/MARC21.pm +++ a/C4/Heading/MARC21.pm @@ -339,7 +339,7 @@ sub parse_heading { my $thesaurus = $tag =~ m/6../ ? _get_subject_thesaurus($field) - : "lcsh"; # use 'lcsh' for names, UT, etc. + : undef; # We can't know the thesaurus for non-subject fields my $search_heading = _get_search_heading( $field, $field_info->{'subfields'} ); my $display_heading = --- a/t/db_dependent/Heading.t +++ a/t/db_dependent/Heading.t @@ -114,7 +114,6 @@ subtest "_search tests" => sub { $terms = $search_query->{query}->{bool}->{must}; $expected_terms = [ { term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, - { term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, ]; is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with single punctuation mark"); @@ -124,7 +123,6 @@ subtest "_search tests" => sub { $terms = $search_query->{query}->{bool}->{must}; $expected_terms = [ { term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, - { term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, ]; is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, hyphen+comma"); @@ -134,7 +132,6 @@ subtest "_search tests" => sub { $terms = $search_query->{query}->{bool}->{must}; $expected_terms = [ { term => { 'match-heading.ci_raw' => 'Tolkien, J.R.R' } }, - { term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, ]; is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, period+comma "); --- a/t/db_dependent/Heading_MARC21.t +++ a/t/db_dependent/Heading_MARC21.t @@ -25,12 +25,12 @@ SKIP: { $heading = C4::Heading->new_from_field($field); is($heading->display_form(), 'The dark is rising ;', 'Display form generation'); is($heading->search_form(), 'The dark is rising', 'Search form generation'); - is($heading->{thesaurus}, 'lcsh', 'Thesaurus generation'); + ok( !defined $heading->{thesaurus}, 'Thesaurus is not generated outside of 6XX fields'); $field = MARC::Field->new( '100', '1', '', a => 'Yankovic, Al', d => '1959-' ); $heading = C4::Heading->new_from_field($field); is($heading->display_form(), 'Yankovic, Al 1959-', 'Display form generation'); is($heading->search_form(), 'Yankovic, Al 1959', 'Search form generation'); - is($heading->{thesaurus}, 'lcsh', 'Thesaurus generation'); + ok( !defined $heading->{thesaurus}, 'Thesaurus is not generated outside of 6XX fields'); } --