That's great! I was only able to fix the cache bug in the authority_authority_linker.pl itself by using the working call in the previous comment. But it does work in terms of modifying the authority record to show the linking indicators. I am not familiar with the second bug you found (different uses of one term would fail to be linked) and not sure how to test that aspect w/o further guidance and/or examples.
However, the updated authority_authority_linker.pl does not appear to take into consideration the function authority.calculate_authority_linking. The function authority.calculate_authority_linking gets called from authority.indexing_ingest_or_delete() each time an authority entry is modified (which happens when authority_authority_linker.pl runs), and currently is not capable of dealing with situations where there are multiple marc tags that are linkable (i.e, several 500 entries). The function will only process one link per marc tag (the very first one it encounters) and populate the authority.authority_linking table with that one result.
I am currently working on a solution for fixing the function "authority.calculate_authority_linking", as that was where I was seeing the additional failure to properly return the correct linking rows for insertion into the authority.authority_linking table.
Here's my WIP branch with the modified function (based off of your branch):
I am not sure how to commit SQL changes, but I've taken the function from the db and modified it with the changes.
The thought of this being a bug is based on my assumption that the authority.authority_linking table should show the following entries given the fact that Auth #3 Mertz, Barbara (id 3 ) contains 500 links for Auth #2 Michaels, Barbara (id 2) and Auth #1 Peters, Elizabeth(id 1 ) :
As is, without modifying the function "authority.calculate_authority_linking", the authority.authority_linking table would only have entry for the first linked tag when running through the auth linking process or when updating the auth record:
Hi Mike,
That's great! I was only able to fix the cache bug in the authority_ authority_ linker. pl itself by using the working call in the previous comment. But it does work in terms of modifying the authority record to show the linking indicators. I am not familiar with the second bug you found (different uses of one term would fail to be linked) and not sure how to test that aspect w/o further guidance and/or examples.
However, the updated authority_ authority_ linker. pl does not appear to take into consideration the function authority. calculate_ authority_ linking. The function authority. calculate_ authority_ linking gets called from authority. indexing_ ingest_ or_delete( ) each time an authority entry is modified (which happens when authority_ authority_ linker. pl runs), and currently is not capable of dealing with situations where there are multiple marc tags that are linkable (i.e, several 500 entries). The function will only process one link per marc tag (the very first one it encounters) and populate the authority. authority_ linking table with that one result.
I am currently working on a solution for fixing the function "authority. calculate_ authority_ linking" , as that was where I was seeing the additional failure to properly return the correct linking rows for insertion into the authority. authority_ linking table.
Here's my WIP branch with the modified function (based off of your branch):
Branch: git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ sreyseng/ lp1312945_ calculate- authority- linking- multiple- tags
http://
I am not sure how to commit SQL changes, but I've taken the function from the db and modified it with the changes.
The thought of this being a bug is based on my assumption that the authority. authority_ linking table should show the following entries given the fact that Auth #3 Mertz, Barbara (id 3 ) contains 500 links for Auth #2 Michaels, Barbara (id 2) and Auth #1 Peters, Elizabeth(id 1 ) :
source | target | field ------- ------- ---
-------
3 | 2 | 21
3 | 1 | 21
As is, without modifying the function "authority. calculate_ authority_ linking" , the authority. authority_ linking table would only have entry for the first linked tag when running through the auth linking process or when updating the auth record:
source | target | field ------- ------- ---
-------
3 | 2 | 21
----------------- $d1927- 2013 $d1927- 2013
--reference--
-----------------
Auth #1:
100 1\$aPeters, Elizabeth,
400 1\$aPiters, Ėlizabet,
500 1\$wnnnc$aMertz, Barbara
Auth #2:
100 1\$aMichaels, Barbara,$d1927-2013
500 1\$wnnnc$aMertz, Barbara
Auth #3: $d1927- 2013
100 1\$aMertz, Barbara
500 1\$wnnnc$aMichaels, Barbara,$d1927-2013
500 1\$wnnnc$aPeters, Elizabeth,
-----------------
I am still actively testing the modified authority. calculate_ authority_ linking function but more eyes and all pointers appreciated!