Bug 12478: Fix error on indexing a specific record
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 4 Sep 2015 12:00:48 +0000 (13:00 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 26 Apr 2016 12:59:54 +0000 (09:59 -0300)
% perl misc/search_tools/rebuild_elastic_search.pl -bn 42
Can't locate object method "idnumber" via package "MARC::Record" at
misc/search_tools/rebuild_elastic_search.pl line 171.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

misc/search_tools/rebuild_elastic_search.pl

index 9e15edb..804bb64 100755 (executable)
@@ -125,7 +125,7 @@ if ($index_biblios) {
         $next = sub {
             my $r = shift @biblionumbers;
             return () unless defined $r;
-            return ($r, Koha::Biblio->get_marc_biblio($r, item_data => 1));
+            return ($r, Koha::Biblio->get_from_biblionumber($r, item_data => 1 ));
         };
     } else {
         my $records = Koha::Biblio->get_all_biblios_iterator();