From c78b1a9a667513c6e30f812be79944d14d1f0c95 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 22 Mar 2023 00:33:23 +0000 Subject: [PATCH] Bug 33277: (follow-up) Fix notdefined search for Zebra and ES Signed-off-by: Frank Hansen Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- C4/Heading.pm | 2 +- t/db_dependent/Heading.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Heading.pm b/C4/Heading.pm index 5c393b4d53..b408622038 100644 --- a/C4/Heading.pm +++ b/C4/Heading.pm @@ -241,7 +241,7 @@ sub _search { # This is legal, so we do a fallback search if( !$total && $thesaurus && !( grep /$thesaurus/,('lcsh','lcac','mesh','nal','notspecified','cash','rvm','sears','aat') ) ){ pop @value; - push @value, 'z'; + push @value, 'notdefined'; $search_query = $builder->build_authorities_query_compat( \@marclist, \@and_or, \@excluding, \@operator, \@value, $self->{'auth_type'}, diff --git a/t/db_dependent/Heading.t b/t/db_dependent/Heading.t index d65132dbc9..7858054fda 100755 --- a/t/db_dependent/Heading.t +++ b/t/db_dependent/Heading.t @@ -166,6 +166,6 @@ subtest "_search tests" => sub { { term => { 'match-heading.ci_raw' => 'Uncles generalsubdiv Fiction' } }, { term => { 'subject-heading-thesaurus.ci_raw' => 'z' } }, ]; - is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for 008_11 = z"); + is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for notdefined (008_11 = z) "); }; -- 2.39.5