X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=bin%2Freindex.pl;fp=bin%2Freindex.pl;h=54dfa628b853b234ece13dc0b6e68524788beac6;hp=36fa799ef7f5b6a920980f060f580a87f0ec81ac;hb=d1dd6faf3e13c8c12bc46254343b16217394f6ba;hpb=040239e61daad5036e47adfdc86fd9c6901c29e1 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);