Bugzilla – Attachment 93730 Details for
Bug 23671
Elasticsearch shouldn't throw exception on an uppercase subfield identifier
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23671: Elasticsearch shouldn't throw exception on an uppercase subfield identifier
Bug-23671-Elasticsearch-shouldnt-throw-exception-o.patch (text/plain), 1.84 KB, created by
Nick Clemens (kidclamp)
on 2019-10-04 10:01:53 UTC
(
hide
)
Description:
Bug 23671: Elasticsearch shouldn't throw exception on an uppercase subfield identifier
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-10-04 10:01:53 UTC
Size:
1.84 KB
patch
obsolete
>From 7de0f08c53ffe960a2d8e37b72f14e0bf6e8c536 Mon Sep 17 00:00:00 2001 >From: Nicolas Legrand <nicolas.legrand@bulac.fr> >Date: Mon, 23 Sep 2019 18:55:56 +0200 >Subject: [PATCH] Bug 23671: Elasticsearch shouldn't throw exception on an > uppercase subfield identifier >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Prevent Elasticsearch from throwing an exception when the mappings >include uppercase subfield identifier. > >Though forbidden in MARC21, It doesn't seem to be the case for Unimarc >or ISO 2709 as a whole. It is also possible to define such a subfield >identifier in the Koha MARC Framework and in the Elasticsearch >mappings. > >Test plan: > >1. add a 995Z subfield identifier in Elasticsearch mappings >(Administration -> Search engine configuration) > >2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b > >3. see it throw: âInvalid MARC field expression: 995Zâ > >4. apply patch > >5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b > >6. sababa > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/SearchEngine/Elasticsearch.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index ce1770320a..16532018ba 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -815,7 +815,7 @@ which is terribly slow. > sub _get_marc_mapping_rules { > my ($self) = @_; > my $marcflavour = lc C4::Context->preference('marcflavour'); >- my $field_spec_regexp = qr/^([0-9]{3})([()0-9a-z]+)?(?:_\/(\d+(?:-\d+)?))?$/; >+ my $field_spec_regexp = qr/^([0-9]{3})([()0-9a-zA-Z]+)?(?:_\/(\d+(?:-\d+)?))?$/; > my $leader_regexp = qr/^leader(?:_\/(\d+(?:-\d+)?))?$/; > my $rules = { > 'leader' => [], >-- >2.11.0
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 23671
:
93133
|
93365
| 93730