4 # perl -I../lib reindex.pl user=admin,password=SWORDFISH,localhost:8018/IR-Explain---1
11 print STDERR "Usage: $0 target\n";
15 my $conn = new ZOOM::Connection($ARGV[0]);
16 $conn->option(preferredRecordSyntax => "xml");
17 $conn->option(elementSetName => "zebra::data");
18 my $rs = $conn->search_pqf('@attr 1=_ALLRECORDS @attr 2=103 ""');
21 print "$0: reindexing $n records\n";
22 foreach my $i (1..$n) {
24 print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
25 my $rec = $rs->record($i-1);
26 my $xml = $rec->render();
29 print " $n/$n (100%)\n" if $n % 50 != 0;
34 # These might be better as ZOOM::Connection methods
38 my $p = $conn->package();
39 $p->option(action => "specialUpdate");
40 $p->option(record => $xml);
48 my $p = $conn->package();