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 => 50;
219
    plan tests => 51;
220
220
221
    my $qb;
221
    my $qb;
222
222
Lines 478-483 subtest 'build_query tests' => sub { Link Here
478
    is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi');
478
    is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi');
479
    is($query_desc, 'title:"donald duck"', 'query desc ok');
479
    is($query_desc, 'title:"donald duck"', 'query desc ok');
480
480
481
    ( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan', 'mc-itype,phr:BOOK', 'mc-itype,phr:CD'] );
482
    is(
483
        $query->{query}{query_string}{query},
484
        '(title:"donald duck") AND (author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))',
485
        "Limits quoted correctly when passed as phrase"
486
    );
487
481
    # Scan queries
488
    # Scan queries
482
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['new'], ['au'], undef, undef, 1 );
489
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['new'], ['au'], undef, undef, 1 );
483
    is(
490
    is(
484
- 

Return to bug 25882