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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-4 / +3 lines)
Lines 460-474 subtest 'build_query tests' => sub { Link Here
460
    ( undef, $query ) = $qb->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 1 } );
460
    ( undef, $query ) = $qb->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 1 } );
461
    is(
461
    is(
462
        $query->{query}{query_string}{query},
462
        $query->{query}{query_string}{query},
463
        '(title:"donald duck") AND suppress:false',
463
        '(title:"donald duck") AND NOT(suppress:1)',
464
        "query of specific field is added AND suppress:false"
464
        "suppress part of the query added correctly"
465
    );
465
    );
466
466
467
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 0 } );
467
    ( undef, $query, $simple_query, $query_cgi, $query_desc ) = $qb->build_query_compat( undef, ['title:"donald duck"'], undef, undef, undef, undef, undef, { suppress => 0 } );
468
    is(
468
    is(
469
        $query->{query}{query_string}{query},
469
        $query->{query}{query_string}{query},
470
        '(title:"donald duck")',
470
        '(title:"donald duck")',
471
        "query of specific field is not added AND suppress:0"
471
        "suppress part of the query not added"
472
    );
472
    );
473
473
474
    ( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan'] );
474
    ( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan'] );
475
- 

Return to bug 31061