Bug 28884: Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Janusz Kaczmarek 2026-03-04 15:31:24 +00:00 committed by Martin Renvoize
parent 3b1566b402
commit 388bcec0ac
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
3 changed files with 35 additions and 0 deletions

View File

@ -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'";
},
};

View File

@ -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',''),

View File

@ -133,6 +133,14 @@ Searching:
- "<pre>ccode: [REF,ARC]</pre><br/> - would mark all REF and ARC collections (Reference and Archives) items as unavailable in Z3950 results.<br/><br/>"
- "You can define multiple keys and values, items meeting ANY of the criteria will be marked unavailable:<br/><br/>"
- "<pre>itype: [REF]<br/>holdingbranch: [REPAIR]</pre><br/> - 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
- ".</br>"
- "The following characters will always be escaped in OPAC searches (with Elasticsearch):"
- pref: OpacElasticsearchEscapeCharacters
class: short
Search form:
-
- pref: LoadSearchHistoryToTheFirstLoggedUser