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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-3 / +5 lines)
Lines 994-999 The argument should be an arrayref, and it'll return an arrayref. Link Here
994
sub _fix_limit_special_cases {
994
sub _fix_limit_special_cases {
995
    my ( $self, $limits ) = @_;
995
    my ( $self, $limits ) = @_;
996
996
997
    # yr is usually an alias of a search field
998
    my $yrfield = ( exists $index_field_convert{'yr'} ) ? $index_field_convert{'yr'} : 'yr';
999
997
    my @new_lim;
1000
    my @new_lim;
998
    foreach my $l (@$limits) {
1001
    foreach my $l (@$limits) {
999
1002
Lines 1002-1014 sub _fix_limit_special_cases { Link Here
1002
            my ( $start, $end ) =
1005
            my ( $start, $end ) =
1003
              ( $l =~ /^yr,st-numeric,ge=(.*) and yr,st-numeric,le=(.*)$/ );
1006
              ( $l =~ /^yr,st-numeric,ge=(.*) and yr,st-numeric,le=(.*)$/ );
1004
            next unless defined($start) && defined($end);
1007
            next unless defined($start) && defined($end);
1005
            push @new_lim, "copydate:[$start TO $end]";
1008
            push @new_lim, "$yrfield:[$start TO $end]";
1006
        }
1009
        }
1007
        elsif ( $l =~ /^yr,st-numeric=/ ) {
1010
        elsif ( $l =~ /^yr,st-numeric=/ ) {
1008
            my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ );
1011
            my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ );
1009
            next unless defined($date);
1012
            next unless defined($date);
1010
            $date = $self->_modify_string_by_type(type => 'st-year', operand => $date);
1013
            $date = $self->_modify_string_by_type(type => 'st-year', operand => $date);
1011
            push @new_lim, "copydate:$date";
1014
            push @new_lim, "$yrfield:$date";
1012
        }
1015
        }
1013
        elsif ( $l =~ /^available$/ ) {
1016
        elsif ( $l =~ /^available$/ ) {
1014
            push @new_lim, 'onloan:false';
1017
            push @new_lim, 'onloan:false';
1015
- 

Return to bug 22801