Bugzilla – Attachment 188667 Details for
Bug 41141
Linker with Elasticsearch fails when heading contains parenthesis or equal sign
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41141: Fix linker with Elasticsearch fails when heading contains parenthesis or equal sign
Bug-41141-Fix-linker-with-Elasticsearch-fails-when.patch (text/plain), 2.24 KB, created by
Fridolin Somers
on 2025-10-30 16:06:22 UTC
(
hide
)
Description:
Bug 41141: Fix linker with Elasticsearch fails when heading contains parenthesis or equal sign
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2025-10-30 16:06:22 UTC
Size:
2.24 KB
patch
obsolete
>From 1c3c821715345e3ff51ac9ba442e07e9b2b05ce6 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 30 Oct 2025 16:35:59 +0100 >Subject: [PATCH] Bug 41141: Fix linker with Elasticsearch fails when heading > contains parenthesis or equal sign > >With Elasticsearch, authorities linker fails when heading contains parenthesis or equal sign. >Looks like those characters are removed because of CCL syntax but Elasticsearch in this context uses 'ci_raw' form that does not matches if characters are removed. >So we should do it only with Zebra. > >Test plan : > 1 - Use Elasticsearch > 2 - Set sysprefs: > RequireChoosingExistingAuthority - don't require > AutoCreateAuthorities - generate > CatalogModuleRelink - Do > AutoLinkBiblio - Do > LinkerModule - first match > 3 - Find a biblio record with an author attached to an authority > 4 - Edit this authority record and add to heading a text with parenthesis, ie '(junior)' > 5 - Edit the biblio record in advanced editor > 6 - Delete the $9 link > 7 - Save the record > 8 - It generates a new authority record >10 - Apply patch and restart all >11 - Repeat 4-5 >12 - It links to the original authority >--- > C4/Heading/MARC21.pm | 7 +++++-- > C4/Heading/UNIMARC.pm | 7 +++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/C4/Heading/MARC21.pm b/C4/Heading/MARC21.pm >index fc7fad7b9c..b34ceead94 100644 >--- a/C4/Heading/MARC21.pm >+++ b/C4/Heading/MARC21.pm >@@ -413,8 +413,11 @@ sub _get_search_heading { > } > } > >- # remove characters that are part of CCL syntax >- $heading =~ s/[)(=]//g; >+ if ( C4::Context->preference('SearchEngine') eq 'Zebra' ) { >+ >+ # remove characters that are part of CCL syntax >+ $heading =~ s/[)(=]//g; >+ } > > return $heading; > } >diff --git a/C4/Heading/UNIMARC.pm b/C4/Heading/UNIMARC.pm >index 7c2969dce9..9efc5c6674 100644 >--- a/C4/Heading/UNIMARC.pm >+++ b/C4/Heading/UNIMARC.pm >@@ -172,8 +172,11 @@ sub _get_search_heading { > } > } > >- # remove characters that are part of CCL syntax >- $heading =~ s/[)(=]//g; >+ if ( C4::Context->preference('SearchEngine') eq 'Zebra' ) { >+ >+ # remove characters that are part of CCL syntax >+ $heading =~ s/[)(=]//g; >+ } > > return $heading; > } >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41141
: 188667