View | Details | Raw Unified | Return to bug 17260
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch.pm (-1 / +1 lines)
Lines 287-293 sub reset_elasticsearch_mappings { Link Here
287
            my $search_field = Koha::SearchFields->find_or_create({ name => $field_name, label => $field_label, type => $field_type }, { key => 'name' });
287
            my $search_field = Koha::SearchFields->find_or_create({ name => $field_name, label => $field_label, type => $field_type }, { key => 'name' });
288
            for my $mapping ( @$mappings ) {
288
            for my $mapping ( @$mappings ) {
289
                my $marc_field = Koha::SearchMarcMaps->find_or_create({ index_name => $index_name, marc_type => $mapping->{marc_type}, marc_field => $mapping->{marc_field} });
289
                my $marc_field = Koha::SearchMarcMaps->find_or_create({ index_name => $index_name, marc_type => $mapping->{marc_type}, marc_field => $mapping->{marc_field} });
290
                $search_field->add_to_search_marc_maps($marc_field, { facet => $mapping->{facet}, suggestible => $mapping->{suggestible}, sort => $mapping->{sort} } );
290
                $search_field->add_to_search_marc_maps($marc_field, { facet => $mapping->{facet} || 0, suggestible => $mapping->{suggestible} || 0, sort => $mapping->{sort} } );
291
            }
291
            }
292
        }
292
        }
293
    }
293
    }
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1476-1482 CREATE TABLE `search_field` ( Link Here
1476
  `id` int(11) NOT NULL AUTO_INCREMENT,
1476
  `id` int(11) NOT NULL AUTO_INCREMENT,
1477
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1477
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1478
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1478
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1479
  `type` ENUM('string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1479
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1480
  PRIMARY KEY (`id`),
1480
  PRIMARY KEY (`id`),
1481
  UNIQUE KEY (`name`)
1481
  UNIQUE KEY (`name`)
1482
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1482
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +1 lines)
Lines 12339-12345 if ( CheckVersion($DBversion) ) { Link Here
12339
             `id` int(11) NOT NULL AUTO_INCREMENT, 
12339
             `id` int(11) NOT NULL AUTO_INCREMENT, 
12340
             `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
12340
             `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
12341
             `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display', 
12341
             `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display', 
12342
             `type` ENUM('string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
12342
             `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
12343
             PRIMARY KEY (`id`),
12343
             PRIMARY KEY (`id`),
12344
             UNIQUE KEY (`name`)
12344
             UNIQUE KEY (`name`)
12345
             ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
12345
             ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
12346
- 

Return to bug 17260