From b9a9e95d609b42ffbbd77782a9887c26b1689145 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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
---
 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.10.2