Bug 12478 - set up database tables for elasticsearch

This sets up the database changes needed to run ES. This isn't intended
to be ready for upstreaming, just to make testing easier.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Robin Sheat 2014-08-25 15:55:50 +12:00 committed by Brendan Gallagher
parent 7dbd13e66f
commit 1d22202fb1
2 changed files with 12 additions and 1 deletions

View File

@ -421,6 +421,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
('SearchEngine','Zebra','Elasticsearch|Solr|Zebra','Search Engine','Choice'),
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),

View File

@ -10355,7 +10355,7 @@ if ( CheckVersion($DBversion) ) {
|);
print "Upgrade to $DBversion done (Bug 8007: Add System Preferences useDischarge, the discharge notice and the new table discharges)\n";
SetVersion($DBversion);
SetVersion ($DBversion);
}
$DBversion = "3.19.00.036";
@ -12256,6 +12256,16 @@ if ( $column_has_been_used ) {
}
$DBversion = "XXX";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
my $installer = C4::Installer->new();
my $full_path = C4::Context->config('intranetdir') . "/installer/data/$installer->{dbms}/elasticsearch_mapping.sql";
my $error = $installer->load_sql($full_path);
warn $error if $error;
print "Upgrade to $DBversion done (Bug 12478 - set up elasticsearch tables)\n";
SetVersion($DBversion);
}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.