View | Details | Raw Unified | Return to bug 18514
Collapse All | Expand All

(-)a/misc/cronjobs/overdrive_get_collection.pl (-5 / +5 lines)
Lines 36-42 pod2usage(1) if $help; Link Here
36
pod2usage( -verbose => 2 ) if $man;
36
pod2usage( -verbose => 2 ) if $man;
37
37
38
use Koha::SearchEngine;
38
use Koha::SearchEngine;
39
use Koha::ElasticSearch::Indexer;
39
use Koha::SearchEngine::Elasticsearch::Indexer;
40
use C4::Context;
40
use C4::Context;
41
41
42
use Data::Dumper;
42
use Data::Dumper;
Lines 44-55 use Data::Dumper; Link Here
44
44
45
# We should put this in config eventually, but it is dependent on the Overdrive API
45
# We should put this in config eventually, but it is dependent on the Overdrive API
46
#
46
#
47
my $fixes = ['move_field(id,Local-number)','move_field(_id,es_id)'];
47
my $fixes = ['copy_field(id,Local-number)','move_field(id,es_id)'];
48
48
49
49
50
# create an indexer object
50
# create an indexer object
51
my $indexer = Koha::ElasticSearch::Indexer->new(
51
my $indexer = Koha::SearchEngine::Elasticsearch::Indexer->new(
52
    { index => $Koha::SearchEngine::BIBLIOS_INDEX } );
52
    { index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX } );
53
53
54
unless ( $indexer->store ) {
54
unless ( $indexer->store ) {
55
    my $params = $indexer->get_elasticsearch_params();
55
    my $params = $indexer->get_elasticsearch_params();
Lines 96-101 my $importer = Link Here
96
   $importer->each(sub {
96
   $importer->each(sub {
97
              my $item = shift;
97
              my $item = shift;
98
              my $stored = $indexer->store->bag->add($item);
98
              my $stored = $indexer->store->bag->add($item);
99
              $indexer->store->bag->commit;
99
                          });
100
                          });
100
101
101
if ( $results->{pages} ){
102
if ( $results->{pages} ){
102
- 

Return to bug 18514