Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
use autodie;
use Getopt::Long;
+use C4::Context;
use Koha::Authority;
use Koha::BiblioUtils;
use Koha::ElasticSearch::Indexer;
pod2usage(1) if $help;
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;
+sanity_check();
+
my $next;
if ($index_biblios) {
_log(1, "Indexing biblios\n");
_log( 1, "$count records indexed.\n" );
}
+# Checks some basic stuff to ensure that it's sane before we start.
+sub sanity_check {
+ # Do we have an elasticsearch block defined?
+ my $conf = C4::Context->config('elasticsearch');
+ die "No 'elasticsearch' block is defined in koha-conf.xml.\n" if ( !$conf );
+}
+
# Output progress information.
#
# _log($level, $msg);