From 0a53d5e6b68c1e67ed6cea8b93090e97da9f0fae Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 23 Oct 2014 20:12:05 -0300 Subject: [PATCH] Bug 12651: DOM indexing is the default On the 23 July development meeting it was decided to formally deprecate GRS-1 indexing mode for Zebra. This patch makes code fallback to DOM on the remaining places. No behaviour change should be noticed, as DOM has been the default for a while. Regards Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Passes tests and QA script. Also checked running Makefile.PL Signed-off-by: Tomas Cohen Arazi --- C4/Context.pm | 2 +- C4/Search.pm | 2 +- Makefile.PL | 8 ++++---- misc/migration_tools/rebuild_zebra.pl | 4 ++-- t/db_dependent/zebra_config.pl | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index f59728de0f..c5f92ee91b 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -720,7 +720,7 @@ sub _new_Zconn { $server //= "biblioserver"; if ( $server eq 'biblioserver' ) { - $index_mode = $context->{'config'}->{'zebra_bib_index_mode'} // 'grs1'; + $index_mode = $context->{'config'}->{'zebra_bib_index_mode'} // 'dom'; } elsif ( $server eq 'authorityserver' ) { $index_mode = $context->{'config'}->{'zebra_auth_index_mode'} // 'dom'; } diff --git a/C4/Search.pm b/C4/Search.pm index 9995ea392e..1326f692bb 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2593,7 +2593,7 @@ sub new_record_from_zebra { my $raw_data = shift; # Set the default indexing modes my $index_mode = ( $server eq 'biblioserver' ) - ? C4::Context->config('zebra_bib_index_mode') // 'grs1' + ? C4::Context->config('zebra_bib_index_mode') // 'dom' : C4::Context->config('zebra_auth_index_mode') // 'dom'; my $marc_record = eval { diff --git a/Makefile.PL b/Makefile.PL index 499172cb2e..d7399e861f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -960,10 +960,10 @@ Primary language for Zebra indexing); Koha can use one of two different indexing modes for the MARC bibliographic records: -grs1 - uses the Zebra GRS-1 filter, available - for legacy support dom - uses the DOM XML filter; offers improved functionality. +grs1 - [DEPRECATED] uses the Zebra GRS-1 filter, + available for legacy support Bibliographic indexing mode); $msg .= _add_valid_values_disp('BIB_INDEX_MODE', $valid_values); @@ -974,10 +974,10 @@ Bibliographic indexing mode); Koha can use one of two different indexing modes for the MARC authorities records: -grs1 - uses the Zebra GRS-1 filter, available - for legacy support dom - uses the DOM XML filter; offers improved functionality. +grs1 - [DEPRECATED] uses the Zebra GRS-1 filter, + available for legacy support Authorities indexing mode); $msg .= _add_valid_values_disp('AUTH_INDEX_MODE', $valid_values); diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl index 682e4beac4..aa31cb2d06 100755 --- a/misc/migration_tools/rebuild_zebra.pl +++ b/misc/migration_tools/rebuild_zebra.pl @@ -152,8 +152,8 @@ my $biblioserverdir = C4::Context->zebraconfig('biblioserver')->{directory}; my $authorityserverdir = C4::Context->zebraconfig('authorityserver')->{directory}; my $kohadir = C4::Context->config('intranetdir'); -my $bib_index_mode = C4::Context->config('zebra_bib_index_mode') || 'grs1'; -my $auth_index_mode = C4::Context->config('zebra_auth_index_mode') || 'dom'; +my $bib_index_mode = C4::Context->config('zebra_bib_index_mode') // 'dom'; +my $auth_index_mode = C4::Context->config('zebra_auth_index_mode') // 'dom'; my $dbh = C4::Context->dbh; my ($biblionumbertagfield,$biblionumbertagsubfield) = &GetMarcFromKohaField("biblio.biblionumber",""); diff --git a/t/db_dependent/zebra_config.pl b/t/db_dependent/zebra_config.pl index 2a5e99dcb9..75efb7b5c6 100755 --- a/t/db_dependent/zebra_config.pl +++ b/t/db_dependent/zebra_config.pl @@ -10,7 +10,7 @@ use File::Spec; my $source = File::Spec->rel2abs('.'); my $destination = $ARGV[0]; my $marc_type = $ARGV[1] || 'marc21'; -my $indexing_mode = $ARGV[2] || 'grs1'; +my $indexing_mode = $ARGV[2] || 'dom'; $ENV{__BIB_INDEX_MODE__} = $indexing_mode; $ENV{__AUTH_INDEX_MODE__} = $indexing_mode; -- 2.39.5