From d8dcfccff53ca69566eea14a8a4b80bef748114f Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Mon, 24 Jun 2024 20:59:42 -0700 Subject: [PATCH] Bug 37167: Fix mapping call number searches to Z39.50 When you do an advanced search for call number, your search uses the index callnum, but the code that maps your search to a possible Z39.50 search still uses the index lcn,phr which was last used 15 years ago, so it's treated as an unknown index and mapped to the Title field in the Z39.50 search form. Test plan: 1. Click Search in the top menu to load Advanced Search 2. Change the dropdown menu for the first input from Keyword to Call Number, and paste TT174.3 in the input and search 3. Find the Z39.50/SRU search button in your results and click it 4. Note that your search was filled in the Title field 5. Apply patch, reset_all 6. Repeat steps 1-3, note that your search was filled in the Dewey field 7. Choose the server Library of Congress SRU and search 8. Note that even though we labelled it Dewey and you searched for an LC call number, your results are things with that call number in 050, the LC call number field. Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- catalogue/search.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 998484d301b..ea37a2fa22c 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -425,9 +425,9 @@ if ($params->{'limit-yr'}) { # $ %z3950p will be a hash ref if the indexes are present (advacned search), otherwise undef my $z3950par; my $indexes2z3950 = { - kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn', - 'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject', - ti=>'title', 'ti,phr'=>'title', se=>'title' + kw => 'title', au => 'author', 'au,phr' => 'author', nb => 'isbn', ns => 'issn', + callnum => 'dewey', su => 'subject', 'su,phr' => 'subject', + ti => 'title', 'ti,phr' => 'title', se => 'title' }; for (my $ii = 0; $ii < @operands; ++$ii) { -- 2.45.2