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

(-)a/Koha/SearchEngine/Elasticsearch.pm (-3 / +3 lines)
Lines 267-273 sub raw_elasticsearch_mappings { Link Here
267
            { search_field_id => $search_field->id },
267
            { search_field_id => $search_field->id },
268
            {
268
            {
269
                join     => 'search_marc_map',
269
                join     => 'search_marc_map',
270
                order_by => { -asc => 'search_marc_map.marc_field' }
270
                order_by => { -asc => ['search_marc_map.marc_type','search_marc_map.marc_field'] }
271
            }
271
            }
272
        );
272
        );
273
273
Lines 279-286 sub raw_elasticsearch_mappings { Link Here
279
279
280
            $mappings->{ $marc_map->index_name }{ $search_field->name }{label} = $search_field->label;
280
            $mappings->{ $marc_map->index_name }{ $search_field->name }{label} = $search_field->label;
281
            $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type;
281
            $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type;
282
            $mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order;
282
            $mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order;
283
            $mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight || undef;
283
            $mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight;
284
284
285
            push (@{ $mappings->{ $marc_map->index_name }{ $search_field->name }{mappings} },
285
            push (@{ $mappings->{ $marc_map->index_name }{ $search_field->name }{mappings} },
286
                {
286
                {
(-)a/installer/data/mysql/atomicupdate/Bug_23204_change_search_marc_map_enum_order.perl (-1 / +7 lines)
Line 0 Link Here
0
- 
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        ALTER TABLE search_marc_map CHANGE marc_type `marc_type` enum('marc21','normarc','unimarc') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what MARC type this map is for';
5
    });
6
    NewVersion( $DBversion, 23204, "Change enum order for marc_type in search_marc_map to fix sorting");
7
}

Return to bug 23204