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

(-)a/installer/data/mysql/atomicupdate/bug_39171-rename_IS02709_ElasticsearchMarcFormat_to_base64ISO2709.pl (+14 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "39171",
5
    description => "Rename ElasticsearchMARCFormat syspref options",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{ UPDATE systempreferences SET options = 'base64ISO2709|ARRAY' WHERE variable = 'ElasticsearchMARCFormat' });
11
        $dbh->do(q{ UPDATE systempreferences SET value = 'base64ISO2709' WHERE variable = 'ElasticsearchMARCFormat' AND value = 'ISO2709' });
12
        say $out "Renamed options for 'ElasticsearchMARCFormat' system preference";
13
    },
14
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 232-238 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
232
('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
232
('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'),
233
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
233
('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL),
234
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
234
('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
235
('ElasticsearchMARCFormat', 'ISO2709', 'ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'),
235
('ElasticsearchMARCFormat', 'base64ISO2709', 'base64ISO2709|ARRAY', 'Elasticsearch MARC format.ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'),
236
('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'),
236
('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'),
237
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
237
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
238
('EmailFieldPrecedence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','multiple'),
238
('EmailFieldPrecedence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','multiple'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-2 / +2 lines)
Lines 304-312 Administration: Link Here
304
        -
304
        -
305
            - "Elasticsearch MARC format: "
305
            - "Elasticsearch MARC format: "
306
            - pref: ElasticsearchMARCFormat
306
            - pref: ElasticsearchMARCFormat
307
              default: "ISO2709"
307
              default: "base64ISO2709"
308
              choices:
308
              choices:
309
                "ISO2709": "ISO2709 (exchange format)"
309
                "base64ISO2709": "ISO2709 (exchange format)"
310
                "ARRAY": "Searchable array"
310
                "ARRAY": "Searchable array"
311
            - <br>ISO2709 format is recommended as it is faster and takes less space, whereas array format makes the full MARC record searchable.
311
            - <br>ISO2709 format is recommended as it is faster and takes less space, whereas array format makes the full MARC record searchable.
312
            - <br><strong>NOTE:</strong> Making the full record searchable may have a negative effect on relevance ranking of search results.
312
            - <br><strong>NOTE:</strong> Making the full record searchable may have a negative effect on relevance ranking of search results.
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t (-4 / +3 lines)
Lines 212-218 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
212
    plan tests => 70;
212
    plan tests => 70;
213
213
214
    t::lib::Mocks::mock_preference( 'marcflavour',             'MARC21' );
214
    t::lib::Mocks::mock_preference( 'marcflavour',             'MARC21' );
215
    t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'ISO2709' );
215
    t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' );
216
216
217
    my @mappings = (
217
    my @mappings = (
218
        {
218
        {
Lines 744-750 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' Link Here
744
744
745
    ok( !( defined $docs->[0]->{unimarc_title} ), "No mapping when marc_type doesn't match marc flavour" );
745
    ok( !( defined $docs->[0]->{unimarc_title} ), "No mapping when marc_type doesn't match marc flavour" );
746
746
747
    # Marc serialization format fallback for records exceeding ISO2709 max record size
747
    # Marc serialization format fallback for records exceeding base64ISO2709 max record size
748
748
749
    my $large_marc_record = MARC::Record->new();
749
    my $large_marc_record = MARC::Record->new();
750
    $large_marc_record->leader('     cam  22      a 4500');
750
    $large_marc_record->leader('     cam  22      a 4500');
Lines 970-976 subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori Link Here
970
    plan tests => 5;
970
    plan tests => 5;
971
971
972
    t::lib::Mocks::mock_preference( 'marcflavour',             'MARC21' );
972
    t::lib::Mocks::mock_preference( 'marcflavour',             'MARC21' );
973
    t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'ISO2709' );
973
    t::lib::Mocks::mock_preference( 'ElasticsearchMARCFormat', 'base64ISO2709' );
974
974
975
    my $builder = t::lib::TestBuilder->new;
975
    my $builder = t::lib::TestBuilder->new;
976
    my $auth_type =
976
    my $auth_type =
977
- 

Return to bug 39171