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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +1 lines)
Lines 872-878 sub _fix_limit_special_cases { Link Here
872
            push @new_lim, "copydate:$date";
872
            push @new_lim, "copydate:$date";
873
        }
873
        }
874
        elsif ( $l =~ /^available$/ ) {
874
        elsif ( $l =~ /^available$/ ) {
875
            push @new_lim, 'onloan:0';
875
            push @new_lim, 'onloan:false';
876
        }
876
        }
877
        else {
877
        else {
878
            push @new_lim, $l;
878
            push @new_lim, $l;
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-3 / +2 lines)
Lines 282-291 subtest 'build_query tests' => sub { Link Here
282
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
282
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
283
    );
283
    );
284
284
285
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'] );
285
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'], undef, ['available'] );
286
    is(
286
    is(
287
        $query->{query}{query_string}{query},
287
        $query->{query}{query_string}{query},
288
        '("donald duck")',
288
        '("donald duck") AND onloan:false',
289
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
289
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
290
    );
290
    );
291
291
292
- 

Return to bug 22874