Re: [Koha] Building authority records after data migration
2013/6/18 Galen Charlton <gmc@esilibrary.com>
Recently, I have successfully migrated all bibliographic records into Koha 3.12. I would like to find out how to build up authority records using bib. records that are in Koha? There doesn't seem to be any instruction on
that will help newbie (like myself) to achieve this. My general recommendation for this sort of situation is to *not* build authority records based on the bib records. Why? First, machine-created authority records will end up "authorizing" any typos and other errors that may exist in your bib headings. Second, much of
On Tue, Jun 18, 2013 at 12:14 AM, Iming Chan <imingchan@yahoo.com.au> wrote: this the value of authority records, particularly for Koha's headings search feature, comes from cross-references, which can't be machine-generated. Consequently, I recommend that you consider downloading authority records from sources such as LC and NLA or using an authority control service.
That said, if you want to proceed, you can make Koha create authority records by first turning on both the AutoCreateAuthorities and BiblioAddsAuthorities system preferences, then saving each bib record individually (and slowly, so that Koha stays on top of indexing the new authority records).
At the moment, there isn't an easy, reliable way to do so as a batch operation; while running the command line link_bibs_to_authorities.pl script will create authority records automatically if the two system preferences I mentioned are enabled, doing it in one fell swoop will creating duplicate authority records. Why? Because newly-created authority aren't indexed instantaneously, so a new one may exist in the database but not be findable by the linker script yet.
To work around that, you could write a script that did the equivalent of
link_bibs_to_authorities.pl --bib-limit 'biblionumber = 1' misc/migration_tools/rebuild_zebra.pl -b -a -z link_bibs_to_authorities.pl --bib-limit 'biblionumber = 2' misc/migration_tools/rebuild_zebra.pl -b -a -z link_bibs_to_authorities.pl --bib-limit 'biblionumber = 3' misc/migration_tools/rebuild_zebra.pl -b -a -z ... link_bibs_to_authorities.pl --bib-limit 'biblionumber = 9999' misc/migration_tools/rebuild_zebra.pl -b -a -z
I add a line (around 96) to execute rebuild_zebra.pl just before processing each record: *[...] while ( my ($biblionumber) = $sth->fetchrow_array() ) { system("/usr/bin/perl /usr/share/koha/bin/migration_tools/ rebuild_zebra.pl -b -a -z"); $num_bibs_processed++; process_bib( $linker, $biblionumber ) [...]* In my case it took about 3 minutes for each 100 records. Note *migration_tools*/ is under bin because is a standard package installation instead of a git one. But, even this *should *work, it seems it doesn't, I wonder why... Paths are correct. Are any other workaround to generate authorities from biblio records? Or a script to deduplicate authorities... Regards! Pablo Bianchi Bs As, Argentina
Pablo Bianchi schreef op do 03-10-2013 om 10:46 [-0300]:
system("/usr/bin/perl /usr/share/koha/bin/migration_tools/ rebuild_zebra.pl -b -a -z"); $num_bibs_processed++; process_bib( $linker, $biblionumber ) [...]*
This seems like a bad thing to do, however I'll just address why it's not working :)
But, even this *should *work, it seems it doesn't, I wonder why... Paths are correct.
If you have a look at 'perldoc -f system' you'll see it takes a list, whereas you've given it a string. All the arguments should be split up so each one should be an element of the list. The easy way is to replace the " quotes with qw( and ), making a quoted list. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
participants (2)
-
Pablo Bianchi -
Robin Sheat