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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +3 lines)
Lines 495-500 sub build_authorities_query_compat { Link Here
495
    # This turns the old-style many-options argument form into a more
495
    # This turns the old-style many-options argument form into a more
496
    # extensible hash form that is understood by L<build_authorities_query>.
496
    # extensible hash form that is understood by L<build_authorities_query>.
497
    my @searches;
497
    my @searches;
498
    my $mappings = $self->get_elasticsearch_mappings();
498
499
499
    # Convert to lower case
500
    # Convert to lower case
500
    $marclist = [map(lc, @{$marclist})];
501
    $marclist = [map(lc, @{$marclist})];
Lines 503-509 sub build_authorities_query_compat { Link Here
503
    my @indexes;
504
    my @indexes;
504
    # Make sure everything exists
505
    # Make sure everything exists
505
    foreach my $m (@$marclist) {
506
    foreach my $m (@$marclist) {
507
506
        push @indexes, exists $koha_to_index_name->{$m} ? $koha_to_index_name->{$m} : $m;
508
        push @indexes, exists $koha_to_index_name->{$m} ? $koha_to_index_name->{$m} : $m;
509
        warn "Unknown search field $m in marclist" unless defined $mappings->{properties}->{data}->{$m};
507
    }
510
    }
508
    for ( my $i = 0 ; $i < @$value ; $i++ ) {
511
    for ( my $i = 0 ; $i < @$value ; $i++ ) {
509
        next unless $value->[$i]; #clean empty form values, ES doesn't like undefined searches
512
        next unless $value->[$i]; #clean empty form values, ES doesn't like undefined searches
510
- 

Return to bug 23719