Bugzilla – Attachment 57454 Details for
Bug 17567
populate_db.pl should initialize ES mappings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17567: Make populate_db.pl initialize ES mappings
Bug-17567-Make-populatedbpl-initialize-ES-mappings.patch (text/plain), 1.84 KB, created by
Jonathan Druart
on 2016-11-11 11:08:36 UTC
(
hide
)
Description:
Bug 17567: Make populate_db.pl initialize ES mappings
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-11 11:08:36 UTC
Size:
1.84 KB
patch
obsolete
>From 50284cb9ce9cccc8cad62165ce0a9fa4a047ddad Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 7 Nov 2016 11:19:03 -0300 >Subject: [PATCH] Bug 17567: Make populate_db.pl initialize ES mappings > >To test: >- Have a clean install, no DB >- Run populate_db.pl: > $ sudo koha-shell kohadev > k$ cd kohaclone > k$ misc/devel/populate_db.pl >- Go to >http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl >=> FAIL: No mappings >- Delete the DB and create an empty one: > $ mysql -uroot > > DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev; > > GRANT ALL PRIVILEGES ON koha_kohadev.* TO > 'koha_kohadev'@'localhost'; >- Run populate_db.pl: > $ sudo koha-shell kohadev > k$ cd kohaclone > k$ misc/devel/populate_db.pl >- Go to > http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl >=> SUCCESS: There are mappings! >- Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > misc/devel/populate_db.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/misc/devel/populate_db.pl b/misc/devel/populate_db.pl >index 3851e0a..9bad049 100755 >--- a/misc/devel/populate_db.pl >+++ b/misc/devel/populate_db.pl >@@ -25,6 +25,8 @@ use Pod::Usage; > use C4::Installer; > use C4::Context; > >+use Koha::SearchEngine::Elasticsearch; >+ > =head1 NAME > > populate_db.pl - Load included sample data into the DB >@@ -160,6 +162,9 @@ sub initialize_data { > INSERT INTO systempreferences(variable, value, options, explanation, type) > VALUES ('Version', '$version', NULL, 'The Koha database version. WARNING: Do not change this value manually, it is maintained by the webinstaller', NULL) > }); >+ >+ # Initialize ES mappings >+ Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings; > } > > sub execute_sqlfile { >-- >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 17567
:
57260
|
57262
| 57454