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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +1 lines)
Lines 965-971 sub _fix_limit_special_cases { Link Here
965
            push @new_lim, "copydate:$date";
965
            push @new_lim, "copydate:$date";
966
        }
966
        }
967
        elsif ( $l =~ /^available$/ ) {
967
        elsif ( $l =~ /^available$/ ) {
968
            push @new_lim, 'onloan:0';
968
            push @new_lim, 'onloan:false';
969
        }
969
        }
970
        else {
970
        else {
971
            push @new_lim, $l;
971
            push @new_lim, $l;
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-3 / +2 lines)
Lines 346-355 subtest 'build_query tests' => sub { Link Here
346
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
346
        "query of just '*' is unaltered when QueryAutoTruncate is enabled"
347
    );
347
    );
348
348
349
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'] );
349
    ( undef, $query ) = $qb->build_query_compat( undef, ['"donald duck"'], undef, ['available'] );
350
    is(
350
    is(
351
        $query->{query}{query_string}{query},
351
        $query->{query}{query_string}{query},
352
        '("donald duck")',
352
        '("donald duck") AND onloan:false',
353
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
353
        "query with quotes is unaltered when QueryAutoTruncate is enabled"
354
    );
354
    );
355
355
356
- 

Return to bug 22874