Bugzilla – Attachment 158007 Details for
Bug 32707
Elasticsearch should not auto truncate (even if QueryAutoTruncate = 1) for identifiers (and some other fields)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32707: Add 'ESPreventAutoTruncate' preference
Bug-32707-Add-ESPreventAutoTruncate-preference.patch (text/plain), 4.43 KB, created by
Janusz Kaczmarek
on 2023-10-27 21:50:44 UTC
(
hide
)
Description:
Bug 32707: Add 'ESPreventAutoTruncate' preference
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2023-10-27 21:50:44 UTC
Size:
4.43 KB
patch
obsolete
>From 2a9249e5fe46c6d869577c7dc1ac5b14509cf4a1 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 25 Oct 2023 09:05:24 +0000 >Subject: [PATCH] Bug 32707: Add 'ESPreventAutoTruncate' preference > >This patch adds a new 'ESPreventAutoTruncate' preference allowing to define >Elasticsearch search fields that should not be autotruncated when 'QueryAutoTruncate' >is active (e.g. barcode). >--- > installer/data/mysql/atomicupdate/bug_32707.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../en/modules/admin/preferences/searching.pref | 5 +++++ > 3 files changed, 20 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_32707.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32707.pl b/installer/data/mysql/atomicupdate/bug_32707.pl >new file mode 100644 >index 0000000000..f7a28e88e9 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32707.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "32707", >+ description => "Add `ESPreventAutoTruncate` preference", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) >+ VALUES ('ESPreventAutoTruncate', 'barcode|control-number|control-number-identifier|date-of-acquisition|date-of-publication|date-time-last-modified|identifier-standard|isbn|issn|itype|lc-card-number|number-local-acquisition|other-control-number|record-control-number', NULL, 'List of searchfields (separated by | or ,) that should not be autotruncated by Elasticsearch even if QueryAutoTruncate is set to Yes', 'Free') >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 91989ef7bc..b9ac2a6188 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -237,6 +237,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'Choice'), > ('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free'), > ('ERMProviderEbscoCustomerID', '', '', 'Customer ID for EBSCO', 'free'), >+('ESPreventAutoTruncate', 'barcode|control-number|control-number-identifier|date-of-acquisition|date-of-publication|date-time-last-modified|identifier-standard|isbn|issn|itype|lc-card-number|number-local-acquisition|other-control-number|record-control-number', NULL, 'List of searchfields (separated by | or ,) that should not be autotruncated by Elasticsearch even if QueryAutoTruncate is set to Yes', 'free'), > ('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'), > ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'), > ('ExpireReservesAutoFillEmail','', NULL,'Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply-to address','Free'), >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 93084ee641..4a4379c03d 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 >@@ -8,6 +8,7 @@ Searching: > 1: automatically. > 0: only if * is added. > - "<br />(The * character would be used like so: <cite>Har*</cite> or <cite>*logging</cite>.)" >+ - <strong>NOTE:</strong> record identifiers (biblionumber, authid) will never be autotruncated. > - > - pref: QueryFuzzy > type: boolean >@@ -94,6 +95,10 @@ Searching: > 1: Enable > 0: Disable > - "the option for staff with permission to create/edit custom saved search filters." >+ - >+ - 'List of searchfields (separated by | or ,) that should not be autotruncated by Elasticsearch even if <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseCashRegisters">QueryAutoTruncate</a> is set to Yes:' >+ - pref: ESPreventAutoTruncate >+ class: long > Search form: > - > - pref : LoadSearchHistoryToTheFirstLoggedUser >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32707
:
145606
|
158007
|
158008
|
158009
|
161035
|
163748
|
163749
|
163750
|
163751
|
163759
|
163822
|
163823
|
163824
|
163880
|
163881
|
163882
|
163892
|
163893
|
163894
|
164140
|
164141
|
164142