From d1dd6faf3e13c8c12bc46254343b16217394f6ba Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 15 Dec 2014 17:07:28 +0000 Subject: [PATCH] Towards IR-350. Tweak UDB-setting code to put it in the right part of the records. Now ready to deploy. --- bin/reindex.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reindex.pl b/bin/reindex.pl index 36fa799..54dfa62 100755 --- a/bin/reindex.pl +++ b/bin/reindex.pl @@ -36,14 +36,14 @@ foreach my $i (1..$n) { print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0; my $rec = $rs->record($i-1); my $xml = $rec->render(); - if ($xml !~ /<\/(e:)?host>/) { + if ($xml !~ /<(e:)?databaseInfo.*?>/) { # There is an undeletable phantom record: ignore it next; } if ($setUdb) { my $udb = qq[irspy-$i]; - $xml =~ s/<\/(e:)?host>/$1$udb/; + $xml =~ s/<(e:)?databaseInfo.*?>/$&$udb/; } update($conn, $xml); -- 1.7.10.4