Lines 12-18
use YAML;
Link Here
|
12 |
use C4::Debug; |
12 |
use C4::Debug; |
13 |
require C4::Context; |
13 |
require C4::Context; |
14 |
|
14 |
|
15 |
use Test::More tests => 196; |
15 |
use Test::More tests => 198; |
16 |
use Test::MockModule; |
16 |
use Test::MockModule; |
17 |
use MARC::Record; |
17 |
use MARC::Record; |
18 |
use File::Spec; |
18 |
use File::Spec; |
Lines 458-463
sub run_marc21_search_tests {
Link Here
|
458 |
is($results_hashref->{biblioserver}->{hits}, 12, |
458 |
is($results_hashref->{biblioserver}->{hits}, 12, |
459 |
'search using index whose name contains "ns" returns expected results (bug 10271)'); |
459 |
'search using index whose name contains "ns" returns expected results (bug 10271)'); |
460 |
|
460 |
|
|
|
461 |
$UseQueryParser = 1; |
462 |
( $error, $query, $simple_query, $query_cgi, |
463 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
464 |
$stopwords_removed, $query_type ) = buildQuery([], [ 'book' ], [ 'kw' ], [], [], 0, 'en'); |
465 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
466 |
is($results_hashref->{biblioserver}->{hits}, 101, "Search for 'book' with index set to 'kw' returns 101 hits"); |
467 |
( $error, $query, $simple_query, $query_cgi, |
468 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
469 |
$stopwords_removed, $query_type ) = buildQuery([ 'and' ], [ 'book', 'another' ], [ 'kw', 'kw' ], [], [], 0, 'en'); |
470 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
471 |
is($results_hashref->{biblioserver}->{hits}, 1, "Search for 'kw:book && kw:another' returns 1 hit"); |
472 |
$UseQueryParser = 0; |
473 |
|
461 |
# FIXME: the availability limit does not actually work, so for the moment we |
474 |
# FIXME: the availability limit does not actually work, so for the moment we |
462 |
# are just checking that it behaves consistently |
475 |
# are just checking that it behaves consistently |
463 |
( $error, $query, $simple_query, $query_cgi, |
476 |
( $error, $query, $simple_query, $query_cgi, |