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 => 194; |
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 451-456
sub run_marc21_search_tests {
Link Here
|
451 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
451 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
452 |
is($results_hashref->{biblioserver}->{hits}, 2, "getRecords generated multi-faceted search matched right number of records"); |
452 |
is($results_hashref->{biblioserver}->{hits}, 2, "getRecords generated multi-faceted search matched right number of records"); |
453 |
|
453 |
|
|
|
454 |
$UseQueryParser = 1; |
455 |
( $error, $query, $simple_query, $query_cgi, |
456 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
457 |
$stopwords_removed, $query_type ) = buildQuery([], [ 'book' ], [ 'kw' ], [], [], 0, 'en'); |
458 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
459 |
is($results_hashref->{biblioserver}->{hits}, 101, "Search for 'book' with index set to 'kw' returns 101 hits"); |
460 |
( $error, $query, $simple_query, $query_cgi, |
461 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
462 |
$stopwords_removed, $query_type ) = buildQuery([ 'and' ], [ 'book', 'another' ], [ 'kw', 'kw' ], [], [], 0, 'en'); |
463 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
464 |
is($results_hashref->{biblioserver}->{hits}, 1, "Search for 'kw:book && kw:another' returns 1 hit"); |
465 |
$UseQueryParser = 0; |
454 |
|
466 |
|
455 |
# FIXME: the availability limit does not actually work, so for the moment we |
467 |
# FIXME: the availability limit does not actually work, so for the moment we |
456 |
# are just checking that it behaves consistently |
468 |
# are just checking that it behaves consistently |