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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +1 lines)
Lines 881-887 sub _fix_limit_special_cases { Link Here
881
            push @new_lim, "copydate:$date";
881
            push @new_lim, "copydate:$date";
882
        }
882
        }
883
        elsif ( $l =~ /^available$/ ) {
883
        elsif ( $l =~ /^available$/ ) {
884
            push @new_lim, 'onloan:0';
884
            push @new_lim, 'onloan:false';
885
        }
885
        }
886
        else {
886
        else {
887
            push @new_lim, $l;
887
            push @new_lim, $l;
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-3 / +2 lines)
Lines 331-340 subtest 'build_query tests' => sub { Link Here
331
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
331
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
332
    );
332
    );
333
333
334
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'] );
334
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'], undef, ['available'] );
335
    is(
335
    is(
336
        $query->{query}{query_string}{query},
336
        $query->{query}{query_string}{query},
337
        '("donald duck")',
337
        '("donald duck") AND onloan:false',
338
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
338
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
339
    );
339
    );
340
340
341
- 

Return to bug 22874