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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +5 lines)
Lines 751-756 sub _convert_index_fields { Link Here
751
            field => exists $index_field_convert{$f} ? $index_field_convert{$f} : $f,
751
            field => exists $index_field_convert{$f} ? $index_field_convert{$f} : $f,
752
            type  => $index_type_convert{ $t // '__default' }
752
            type  => $index_type_convert{ $t // '__default' }
753
        };
753
        };
754
        $r->{field} .= '-all'
755
            if C4::Context->preference('SearchCancelAndInvalidISBNandISSN') && $r->{field} =~ /^is[bs]n$/;
754
        $r->{field} = ($mc . $r->{field}) if $mc && $r->{field};
756
        $r->{field} = ($mc . $r->{field}) if $mc && $r->{field};
755
        $r->{field} || $r->{type} ? $r : undef;
757
        $r->{field} || $r->{type} ? $r : undef;
756
    } @indexes;
758
    } @indexes;
Lines 818-823 sub _convert_index_strings_freeform { Link Here
818
    $search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og;
820
    $search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og;
819
    # Resolve possible field aliases
821
    # Resolve possible field aliases
820
    $search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1).($1 eq 'kw' ? "$2" : "$2:")/oge;
822
    $search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1).($1 eq 'kw' ? "$2" : "$2:")/oge;
823
    if ( C4::Context->preference('SearchCancelAndInvalidISBNandISSN') ) {
824
        $search =~ s/\b(is[bs]n)(?=$multi_field_pattern:)/$1-all/g;
825
    }
821
    return $search;
826
    return $search;
822
}
827
}
823
828
824
- 

Return to bug 36798