Bugzilla – Attachment 65004 Details for
Bug 18514
Allow library to search their Koha and Overdrive collections using ElasticSearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18514 - Followup
Bug-18514---Followup.patch (text/plain), 1.71 KB, created by
Nick Clemens (kidclamp)
on 2017-07-12 10:53:41 UTC
(
hide
)
Description:
Bug 18514 - Followup
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-07-12 10:53:41 UTC
Size:
1.71 KB
patch
obsolete
>From b6888793e04e514a55a2f5a80de8d03135e33301 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 Jul 2017 10:52:01 +0000 >Subject: [PATCH] Bug 18514 - Followup > >Adjust ES paths >Alter fix to retain ID (so records overwrite on re-run) >Commit the records >--- > misc/cronjobs/overdrive_get_collection.pl | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/overdrive_get_collection.pl b/misc/cronjobs/overdrive_get_collection.pl >index 06e9092..3d2bf1b 100644 >--- a/misc/cronjobs/overdrive_get_collection.pl >+++ b/misc/cronjobs/overdrive_get_collection.pl >@@ -36,7 +36,7 @@ pod2usage(1) if $help; > pod2usage( -verbose => 2 ) if $man; > > use Koha::SearchEngine; >-use Koha::ElasticSearch::Indexer; >+use Koha::SearchEngine::Elasticsearch::Indexer; > use C4::Context; > > use Data::Dumper; >@@ -44,12 +44,12 @@ use Data::Dumper; > > # We should put this in config eventually, but it is dependent on the Overdrive API > # >-my $fixes = ['move_field(id,Local-number)','move_field(_id,es_id)']; >+my $fixes = ['copy_field(id,Local-number)','move_field(id,es_id)']; > > > # create an indexer object >-my $indexer = Koha::ElasticSearch::Indexer->new( >- { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >+my $indexer = Koha::SearchEngine::Elasticsearch::Indexer->new( >+ { index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX } ); > > unless ( $indexer->store ) { > my $params = $indexer->get_elasticsearch_params(); >@@ -96,6 +96,7 @@ my $importer = > $importer->each(sub { > my $item = shift; > my $stored = $indexer->store->bag->add($item); >+ $indexer->store->bag->commit; > }); > > if ( $results->{pages} ){ >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18514
:
62902
|
62903
|
62904
|
65004
|
65858
|
65859
|
65860
|
65861