Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 13; |
20 |
use Test::More tests => 14; |
21 |
use t::lib::Mocks; |
21 |
use t::lib::Mocks; |
22 |
|
22 |
|
23 |
use Koha::SearchEngine::Elasticsearch::QueryBuilder; |
23 |
use Koha::SearchEngine::Elasticsearch::QueryBuilder; |
Lines 84-89
is( $searcher->index, 'mydb', 'Testing basic accessor' );
Link Here
|
84 |
|
84 |
|
85 |
ok( my $query = $builder->build_query('easy'), 'Build a search query'); |
85 |
ok( my $query = $builder->build_query('easy'), 'Build a search query'); |
86 |
|
86 |
|
|
|
87 |
my (undef, $or_query) = $builder->build_query_compat( ['OR'], ['a', 'b'], undef, ['mc-itype:c'] ); |
88 |
is( |
89 |
$or_query->{query}->{query_string}->{query}, |
90 |
'((a*) OR (b*)) AND itype:("c")', |
91 |
'Testing OR query with limit' |
92 |
); |
93 |
|
87 |
SKIP: { |
94 |
SKIP: { |
88 |
|
95 |
|
89 |
eval { $builder->get_elasticsearch_params; }; |
96 |
eval { $builder->get_elasticsearch_params; }; |
90 |
- |
|
|