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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-2 / +8 lines)
Lines 216-222 subtest 'build_authorities_query_compat() tests' => sub { Link Here
216
};
216
};
217
217
218
subtest 'build_query tests' => sub {
218
subtest 'build_query tests' => sub {
219
    plan tests => 52;
219
    plan tests => 53;
220
220
221
    my $qb;
221
    my $qb;
222
222
Lines 481-486 subtest 'build_query tests' => sub { Link Here
481
    is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi');
481
    is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi');
482
    is($query_desc, 'title:"donald duck"', 'query desc ok');
482
    is($query_desc, 'title:"donald duck"', 'query desc ok');
483
483
484
    ( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan', 'mc-itype,phr:BOOK', 'mc-itype,phr:CD'] );
485
    is(
486
        $query->{query}{query_string}{query},
487
        '(title:"donald duck") AND (author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))',
488
        "Limits quoted correctly when passed as phrase"
489
    );
490
484
    # Scan queries
491
    # Scan queries
485
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['new'], ['au'], undef, undef, 1 );
492
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['new'], ['au'], undef, undef, 1 );
486
    is(
493
    is(
487
- 

Return to bug 25882