Koha/misc/bin/koha-index
Bernardo Gonzalez Kriegel e5f4a0e3d5 Bug 11081: (followup) Add license information
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:30:44 +00:00

96 lines
2.3 KiB
Perl
Executable file

#!/usr/bin/perl
# This file is part of Koha.
#
# Copyright (C) 2013 Tamil s.a.r.l.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
package Main;
use Modern::Perl;
use utf8;
use Koha::Indexer::Indexing;
use Pod::Usage;
my $indexer = Koha::Indexer::Indexing->new_with_options();
if ( $indexer->help ) {
pod2usage( -verbose => 99 );
exit;
}
$indexer->run();
__END__
=pod
=head1 SYNOPSIS
koha-index
koha-index --verbose
koha-index --source biblio --select queue
koha-index --source authority --select all
koha-index --select queue --directory /tmp/koha-index-mylib --keep
=head1 DESCRIPTION
Index queued biblio/autority record, or reindex the whole DB. Koha standard
environment variables must ne set appropriately: KOHA_CONF and PERL5LIB.
=head1 OPTIONS
=over
=item --source
Select records to be indexed: C<biblio> or C<authority>. If not specified,
biblio by default.
=item --select
Select record to be indexed: C<all> or C<queue>. If not specified, C<all> is
selected. If C<all> is selected, zebra database is reset before indexing.
=item --directory
Directory where records to be indexed by Zebra are exported. If not specified,
a direcory named C<koha-index> is used, and if necessary created, in the
current directory. In this directory, sub-directories are created containing
records to be updated or deleted by Zebra. If those subdirectories already
exist, they are first emptied. The export directory tree is kept after zebra
indexing.
=item --keep
Keep the directory, and its content, where biblio/authority records have been
exported.
=item --verbose
Increase the amount of logging. Normally only warnings and errors from the
indexing are shown.
=back
=head1 SEE ALSO
=for :list
* L<koha-index-daemon>
=cut