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.
Created attachment 188667 [details] [review] 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
I'm trying to add a UT
Hmm I can't reproduce this one. I'm stuck at the stage of deleting the $9 link in the advanced editor. I erase it but when I click "Save to catalog", it re-creates the linkage to the correct authority: I'm using biblio 134 in KTD where I added (junior) onto the heading: 100 _ _ ‡aHumble, Jez. (junior)‡9926
(In reply to David Cook from comment #3) > Hmm I can't reproduce this one. > > I'm stuck at the stage of deleting the $9 link in the advanced editor. I > erase it but when I click "Save to catalog", it re-creates the linkage to > the correct authority: > > I'm using biblio 134 in KTD where I added (junior) onto the heading: > > 100 _ _ ‡aHumble, Jez. (junior)‡9926 Hi, thanks for testing. With Elasticsearch ?
(In reply to Fridolin Somers from comment #4) > Hi, thanks for testing. No worries. We're almost exclusively using Elasticsearch these days, so always keen to fix ES related bugs. > With Elasticsearch ? As far as I know I was using it yeah. Could you try again on KTD to reproduce? Maybe I'm just doing the wrong process?
Is step 0 maybe "Have a set of custom ES mappings which include mappings for Match-heading"? The intention of bug 24269 and bug 25273 was to have the Match-heading index be exactly $heading->search_form on the authority field, so it shouldn't matter that the )(= are stripped from the biblio heading since they are also stripped from the authority heading while creating the Match-heading index. But I know from a horrible mislinking bug on my production system with stale vendor-supplied mappings that if you also still have custom Match-heading mappings, you'll get unexpected results.