diff --git a/installer/data/mysql/atomicupdate/bug_28884.pl b/installer/data/mysql/atomicupdate/bug_28884.pl new file mode 100755 index 0000000000..a326c43f95 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28884.pl @@ -0,0 +1,25 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "28884", + description => "Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences ( `variable`, `value` ) + VALUES ('ElasticsearchEscapeCharacters', '')} + ); + + say $out "Added new system preference 'ElasticsearchEscapeCharacters'"; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences ( `variable`, `value` ) + VALUES ('OpacElasticsearchEscapeCharacters', '')} + ); + + say $out "Added new system preference 'OpacElasticsearchEscapeCharacters'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c27a295968..60e9404ee5 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -242,6 +242,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('ElasticsearchBoostFieldMatch', '0'), ('ElasticsearchBoostFieldMatchAmount', '0'), ('ElasticsearchCrossFields', '1'), +('ElasticsearchEscapeCharacters', ''), ('ElasticsearchIndexStatus_authorities', '0'), ('ElasticsearchIndexStatus_biblios', '0'), ('ElasticsearchMARCFormat', 'base64ISO2709'), @@ -513,6 +514,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('OPACdidyoumean',''), ('OPACDisableSendList','0'), ('OPACDisplay856uAsImage','OFF'), +('OpacElasticsearchEscapeCharacters', ''), ('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd'), ('OPACFallback', 'prog'), ('OpacFavicon',''), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 84c718d7b0..c73d2579f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -133,6 +133,14 @@ Searching: - "
ccode: [REF,ARC]

- would mark all REF and ARC collections (Reference and Archives) items as unavailable in Z3950 results.

" - "You can define multiple keys and values, items meeting ANY of the criteria will be marked unavailable:

" - "
itype: [REF]
holdingbranch: [REPAIR]

- would mark all reference items AND items at the REPAIR branch as unavailable." + - + - "The following characters will always be escaped in intranet searches (with Elasticsearch):" + - pref: ElasticsearchEscapeCharacters + class: short + - ".
" + - "The following characters will always be escaped in OPAC searches (with Elasticsearch):" + - pref: OpacElasticsearchEscapeCharacters + class: short Search form: - - pref: LoadSearchHistoryToTheFirstLoggedUser