@@ -, +, @@ --- misc/migration_tools/rebuild_zebra.pl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) --- a/misc/migration_tools/rebuild_zebra.pl +++ a/misc/migration_tools/rebuild_zebra.pl @@ -35,6 +35,7 @@ my $as_xml; my $process_zebraqueue; my $do_not_clear_zebraqueue; my $verbose_logging; +my $limit; my $zebraidx_log_opt = " -v none,fatal,warn "; my $result = GetOptions( 'd:s' => \$directory, @@ -52,6 +53,7 @@ my $result = GetOptions( 'y' => \$do_not_clear_zebraqueue, 'z' => \$process_zebraqueue, 'v' => \$verbose_logging, + 'l|limit:i' => \$limit, ); @@ -313,6 +315,7 @@ sub export_marc_records_from_sth { my $i = 0; my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField("items.itemnumber",''); while (my ($record_number) = $sth->fetchrow_array) { + last if defined $limit && $i >= $limit; print "." if ( $verbose_logging ); print "\r$i" unless ($i++ %100 or !$verbose_logging); if ( $nosanitize ) { --