[Koha-bugs] [Bug 12478] Elasticsearch support for Koha

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 29 04:37:31 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12478

Srdjan Jankovic <srdjan at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |srdjan at catalyst.net.nz

--- Comment #244 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
I had a problem with the database patch. I had to do:

diff --git a/installer/data/mysql/updatedatabase.pl
b/installer/data/mysql/updatedatabase.pl
index 9e6d390..e092704 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -12332,13 +12332,13 @@ my $indexes = LoadFile( $mappings_yaml );

 while ( my ( $index_name, $fields ) = each %$indexes ) {
         while ( my ( $field_name, $data ) = each %$fields ) {
-            my $field_type = $data->{type};
+            my $field_type = $data->{type} || 'string';
             my $field_label = $data->{label};
             my $mappings = $data->{mappings};
             my $search_field = Koha::SearchFields->find_or_create({ name =>
$field_name, label => $field_label, type => $field_type }, { key => 'name' });
             for my $mapping ( @$mappings ) {
                 my $marc_field = Koha::SearchMarcMaps->find_or_create({
index_name => $index_name, marc_type => $mapping->{marc_type}, marc_field =>
$mapping->{marc_field} });
-                $search_field->add_to_search_marc_maps($marc_field, { facet =>
$mapping->{facet}, suggestible => $mapping->{suggestible}, sort =>
$mapping->{sort} } );
+                $search_field->add_to_search_marc_maps($marc_field, { facet =>
$mapping->{facet} || 0, suggestible => $mapping->{suggestible} || 0, sort =>
$mapping->{sort} || undef } );
             }
         }
 }

Was it just my mysql?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list