my $skip_search; # Skip the search reingest.
my $skip_facets; # Skip the facets reingest.
my $skip_display; # Skip the display reingest.
+my $rebuild_rmsr; # Rebuild reporter.materialized_simple_record.
my $start_id; # start processing at this bib ID.
my $end_id; # stop processing when this bib ID is reached.
my $max_duration; # max processing duration in seconds
'skip-search' => \$skip_search,
'skip-facets' => \$skip_facets,
'skip-display' => \$skip_display,
+ 'rebuild-rmsr' => \$rebuild_rmsr,
'start-id=i' => \$start_id,
'end-id=i' => \$end_id,
'pipe' => \$opt_pipe,
This option can be used more than once to specify multiple
attributes to ingest.
This option is ignored if --skip-attrs is also given.
+ --rebuild-rmsr
+ Rebuild the reporter.materialized_simple_record table.
--start-id
Start processing at this record ID.
}
}
+# Rebuild reporter.materialized_simple_record after the ingests.
+rmsr_rebuild() if ($rebuild_rmsr);
+
# This subroutine forks a process to do the browse-only ingest on the
# @blist above. It cannot be parallelized, but can run in parrallel
# to the other ingests.
}
}
}
+
+# Rebuild/refresh reporter.materialized_simple_record
+sub rmsr_rebuild {
+ print("Rebuilding reporter.materialized_simple_record\n");
+ my $dbh = DBI->connect("DBI:Pg:database=$db_db;host=$db_host;port=$db_port;application_name=pingest",
+ $db_user, $db_password);
+ $dbh->selectall_arrayref("SELECT reporter.refresh_materialized_simple_record();");
+ $dbh->disconnect();
+}
--- /dev/null
+--rebuild-rmsr Option Added to pingest.pl
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+An option, `--rebuild-rmsr`, has been added to the pingest.pl support
+script. This option will rebuild the
+reporter.materialized_simple_record (rmsr) table after the ingests are
+complete.
+
+This option might prove useful if you want to rebuild the table as
+part of a larger reingest. If all you wish to do is to rebuild the
+rmsr table, then it would be just as simple to connect to the database
+server and run the following SQL:
+
+[source,sql]
+----
+SELECT reporter.refresh_materialized_simple_record();
+----