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

(-)a/Koha/SearchEngine/Elasticsearch.pm (-3 / +9 lines)
Lines 263-272 sub raw_elasticsearch_mappings { Link Here
263
    my $mappings = {};
263
    my $mappings = {};
264
    while ( my $search_field = $search_fields->next ) {
264
    while ( my $search_field = $search_fields->next ) {
265
265
266
        my $marc_to_fields = $schema->resultset('SearchMarcToField')->search( { search_field_id => $search_field->id } );
266
        my $marc_to_fields = $schema->resultset('SearchMarcToField')->search(
267
            { search_field_id => $search_field->id },
268
            {
269
                join     => 'search_marc_map',
270
                order_by => { -asc => 'search_marc_map.marc_field' }
271
            }
272
        );
267
273
268
        while ( my $marc_to_field = $marc_to_fields->next ) {
274
        while ( my $marc_to_field = $marc_to_fields->next ) {
269
            my $marc_map = Koha::SearchMarcMaps->find( $marc_to_field->search_marc_map_id );
275
276
            my $marc_map = $marc_to_field->search_marc_map;
270
277
271
            next if $marc_type && $marc_map->marc_type ne $marc_type;
278
            next if $marc_type && $marc_map->marc_type ne $marc_type;
272
279
273
- 

Return to bug 23204