Bugzilla – Attachment 6995 Details for
Bug 7246
rebuild_zebra.pl --limit option to allow partial re-indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed Off] Bug 7246 - rebuild_zebra.pl --limit number for partial reindexing
Signed-Off-Bug-7246---rebuildzebrapl---limit-numbe.patch (text/plain), 2.14 KB, created by
Liz Rea
on 2011-12-31 22:30:28 UTC
(
hide
)
Description:
[Signed Off] Bug 7246 - rebuild_zebra.pl --limit number for partial reindexing
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2011-12-31 22:30:28 UTC
Size:
2.14 KB
patch
obsolete
>From 9d5fae181500f51ac4d8393b6f209fef9044d1ad Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Thu, 17 Nov 2011 23:02:36 +0100 >Subject: [PATCH] [Signed Off] Bug 7246 - rebuild_zebra.pl --limit number for > partial reindexing >Content-Type: text/plain; charset="utf-8" > >Partial re-indexing is mostly useful when experimenting with Zebra >configuration and your test database is too large to be re-indexed for each >trial. > >I'm submitting it after I added this twice to source code of rebuild_zebra.pl >and I hope it might prove useful to others also. > >Test scenario: >1. pick koha instance for which you don't mind truncating results in search >2. re-run rebuild_zebra.pl and add --limit 1000 > >http://bugs.koha-community.org/show_bug.cgi?id=7246 >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >Verified that --limit 3 only exports 3 records of the indexing batch. > >I think this is a useful option for testers and would like to see it in. >The other suggestions can be implemented at a later time. >--- > misc/migration_tools/rebuild_zebra.pl | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index fbfd3af..4412698 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/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 ) { >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7246
:
6345
|
6347
|
6994
|
6995
|
7200
|
7379
|
7410
|
7470
|
7564