[Bug 30522] New: merge authorities has a max limit of 100 on number of linked biblios it will modify
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Bug ID: 30522 Summary: merge authorities has a max limit of 100 on number of linked biblios it will modify Change sponsored?: --- Product: Koha Version: 21.11 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: bernard.scaife@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl With systempreference AuthorityMergeLimit set to say 50, if you amend an authority record which has more than 100 linked bibs and run merge_authorities -b -v - then only the first 100 bibs are amended to match the authority. The remaining ones are unmodified. I think it relates to line 81 of /Koha/Authorities.pm and what is returned to the variable $result. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Interesting. Could provide details about the version you experience this? I tested this: use Modern::Perl; use Data::Dumper qw/Dumper/; use Koha::Authorities; my @biblionumbers = Koha::Authorities->linked_biblionumbers({ authid => 1 }); print Dumper( scalar @biblionumbers ); I have 149 biblionumbers attached to authid 1. And got this result: $VAR1 = 149; So that should be fine (as a first check). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- But I am seeing something funny.
From my 149 records, 148 records have been updated when I made a change in the authority. But one record (somewhere in the middle) has not been updated!
Note that 148 > 100 records and this tells me that your problem does not occur in current master. And I do think that 21.11 and master are not different as to merging authorities. Could you clarify/show more details about your conclusion that only 100 records were updated in your catalog? How do you reach that conclusion? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Cataloging |MARC Authority data support -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #2)
From my 149 records, 148 records have been updated when I made a change in the authority. But one record (somewhere in the middle) has not been updated!
This must have been something else. From a previous test. Created with build_sample_biblio. I removed all those records. Created 200 records. Linked to authid 1. Changed authid 1. All 200 records are merged by the cron script. All working fine. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|merge authorities has a max |Issue with |limit of 100 on number of |merge_authorities script ? |linked biblios it will | |modify | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 --- Comment #4 from Bernard <bernard.scaife@ptfs-europe.com> --- It's version 21.11.01.000 I've just run your little script: use Modern::Perl; use Data::Dumper qw/Dumper/; use Koha::Authorities; my @biblionumbers = Koha::Authorities->linked_biblionumbers({ authid => 7307 }); print Dumper( scalar @biblionumbers );
$ perl /home2/kfc/kohaclone/Koha/bertest.pl $VAR1 = 100; There are 104 bib records linked to this authority -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal QA Contact|testopia@bugs.koha-communit | |y.org | CC| |nick@bywatersolutions.com, | |tomascohen@gmail.com Version|21.11 |master Component|MARC Authority data support |Searching - Elasticsearch Summary|Issue with |SearchEngine::simple_search |merge_authorities script ? |_compat should not limit to | |100 records for | |ElasticSearch --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Bernard from comment #4)
It's version 21.11.01.000
I've just run your little script:
use Modern::Perl; use Data::Dumper qw/Dumper/; use Koha::Authorities; my @biblionumbers = Koha::Authorities->linked_biblionumbers({ authid => 7307 }); print Dumper( scalar @biblionumbers );
$ perl /home2/kfc/kohaclone/Koha/bertest.pl $VAR1 = 100;
There are 104 bib records linked to this authority
Found it! You are using ElasticSearch, I used Zebra. The cause is in the Koha/SearchEngine/ElasticSearch/Search.pm module: sub simple_search_compat { my ($self, $query, $offset, $max_results) = @_; return ('No query entered', undef, undef) unless $query; my %options; $offset = 0 if not defined $offset or $offset < 0; $options{offset} = $offset; $max_results //= 100; => This sub expects a max_results parameter for Elastic while the Zebra one does not require it. No max_results means there all results. So we need to adjust that one somehow. CCing Nick and Tomas. Good catch ! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|SearchEngine::simple_search |SearchEngine::simple_search |_compat should not limit to |_compat should not limit to |100 records for |100 records for |ElasticSearch |ElasticSearch (causing | |incomplete authority | |merges) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Bad news: this is a duplicate now. Good news: the duplicate bug has a patch and is waiting for QA. *** This bug has been marked as a duplicate of bug 30883 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org