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

(-)a/Koha/SearchEngine/Elasticsearch.pm (-2 / +4 lines)
Lines 282-287 sub raw_elasticsearch_mappings { Link Here
282
            $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type;
282
            $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type;
283
            $mappings->{ $marc_map->index_name }{ $search_field->name }{mandatory} = $search_field->mandatory;
283
            $mappings->{ $marc_map->index_name }{ $search_field->name }{mandatory} = $search_field->mandatory;
284
            $mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order;
284
            $mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order;
285
            $mappings->{ $marc_map->index_name }{ $search_field->name }{authorised_value_category} =
286
                $search_field->authorised_value_category
287
                if defined $search_field->authorised_value_category;
285
            $mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight;
288
            $mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight;
286
            $mappings->{ $marc_map->index_name }{ $search_field->name }{opac} = $search_field->opac if defined $search_field->opac;
289
            $mappings->{ $marc_map->index_name }{ $search_field->name }{opac} = $search_field->opac if defined $search_field->opac;
287
            $mappings->{ $marc_map->index_name }{ $search_field->name }{staff_client} = $search_field->staff_client if defined $search_field->staff_client;
290
            $mappings->{ $marc_map->index_name }{ $search_field->name }{staff_client} = $search_field->staff_client if defined $search_field->staff_client;
Lines 362-368 sub reset_elasticsearch_mappings { Link Here
362
    while ( my ( $index_name, $fields ) = each %$indexes ) {
365
    while ( my ( $index_name, $fields ) = each %$indexes ) {
363
        while ( my ( $field_name, $data ) = each %$fields ) {
366
        while ( my ( $field_name, $data ) = each %$fields ) {
364
367
365
            my %sf_params = map { $_ => $data->{$_} } grep { exists $data->{$_} } qw/ type label weight staff_client opac facet_order mandatory/;
368
            my %sf_params = map { $_ => $data->{$_} } grep { exists $data->{$_} } qw/ type label weight staff_client opac facet_order authorised_value_category mandatory/;
366
369
367
            # Set default values
370
            # Set default values
368
            $sf_params{staff_client} //= 1;
371
            $sf_params{staff_client} //= 1;
369
- 

Return to bug 36396