|
Lines 340-349
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
| 340 |
MARC::Field->new('999', '', '', c => '1234568'), |
340 |
MARC::Field->new('999', '', '', c => '1234568'), |
| 341 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno), |
341 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric', o => $long_callno), |
| 342 |
); |
342 |
); |
| 343 |
my $records = [ |
343 |
my $records = [ $marc_record_1, $marc_record_2 ]; |
| 344 |
{ record => $marc_record_1 }, |
|
|
| 345 |
{ record => $marc_record_2 }, |
| 346 |
]; |
| 347 |
|
344 |
|
| 348 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
345 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
| 349 |
|
346 |
|
|
Lines 510-516
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests'
Link Here
|
| 510 |
$large_marc_record->append_fields($item_field); |
507 |
$large_marc_record->append_fields($item_field); |
| 511 |
} |
508 |
} |
| 512 |
|
509 |
|
| 513 |
$docs = $see->marc_records_to_documents([{ record => $large_marc_record }]); |
510 |
$docs = $see->marc_records_to_documents([$large_marc_record]); |
| 514 |
|
511 |
|
| 515 |
is($docs->[0]->{marc_format}, 'MARCXML', 'For record exceeding max record size marc_format should be set correctly'); |
512 |
is($docs->[0]->{marc_format}, 'MARCXML', 'For record exceeding max record size marc_format should be set correctly'); |
| 516 |
|
513 |
|
|
Lines 623-632
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents_array () t
Link Here
|
| 623 |
MARC::Field->new('999', '', '', c => '1234568'), |
620 |
MARC::Field->new('999', '', '', c => '1234568'), |
| 624 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric'), |
621 |
MARC::Field->new('952', '', '', 0 => 1, g => 'string where should be numeric'), |
| 625 |
); |
622 |
); |
| 626 |
my $records = [ |
623 |
my $records = [ $marc_record_1, $marc_record_2 ]; |
| 627 |
{ record => $marc_record_1 }, |
|
|
| 628 |
{ record => $marc_record_2 }, |
| 629 |
]; |
| 630 |
|
624 |
|
| 631 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
625 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
| 632 |
|
626 |
|
|
Lines 701-710
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori
Link Here
|
| 701 |
$marc_record_2->append_fields( |
695 |
$marc_record_2->append_fields( |
| 702 |
MARC::Field->new('150', '', '', a => 'Subject', v => 'Genresubdiv', z => 'Geosubdiv', x => 'Generalsubdiv', e => 'wrongsubdiv' ), |
696 |
MARC::Field->new('150', '', '', a => 'Subject', v => 'Genresubdiv', z => 'Geosubdiv', x => 'Generalsubdiv', e => 'wrongsubdiv' ), |
| 703 |
); |
697 |
); |
| 704 |
my $records = [ |
698 |
my $records = [ $marc_record_1, $marc_record_2 ]; |
| 705 |
{ record => $marc_record_1, authtypecode=> $auth_type->authtypecode }, |
|
|
| 706 |
{ record => $marc_record_2, authtypecode=> $auth_type->authtypecode }, |
| 707 |
]; |
| 708 |
|
699 |
|
| 709 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
700 |
$see->get_elasticsearch_mappings(); #sort_fields will call this and use the actual db values unless we call it first |
| 710 |
|
701 |
|
| 711 |
- |
|
|