Bugzilla – Attachment 155145 Details for
Bug 27153
ElasticSearch should search keywords apostrophe blind
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27153: DB Updates
Bug-27153-DB-Updates.patch (text/plain), 2.54 KB, created by
Nick Clemens (kidclamp)
on 2023-09-01 17:57:13 UTC
(
hide
)
Description:
Bug 27153: DB Updates
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-09-01 17:57:13 UTC
Size:
2.54 KB
patch
obsolete
>From 97170b871c24bc6ff9d53268008109ba48afe701 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 1 Sep 2023 12:38:44 +0000 >Subject: [PATCH] Bug 27153: DB Updates > >We start by adding the field to the table > >It is possible a library would want two versions of the same field in >the indexing. We need to make the filter part of the primary key in >order to allow this >--- > .../data/mysql/atomicupdate/bug_27153.pl | 31 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 32 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_27153.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_27153.pl b/installer/data/mysql/atomicupdate/bug_27153.pl >new file mode 100755 >index 0000000000..b226888bc6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_27153.pl >@@ -0,0 +1,31 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "27153", >+ description => "Add option to filter search fields", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ unless ( column_exists( 'search_marc_to_field', 'filter' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE search_marc_to_field >+ ADD filter varchar(100) NOT NULL DEFAULT '' COMMENT 'specify a filter to be applied to field' >+ AFTER search >+ } >+ ); >+ say $out "Added column 'search_marc_to_field.filter'"; >+ } >+ unless ( primary_key_exists( 'search_marc_to_field', 'filter' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE search_marc_to_field >+ DROP PRIMARY KEY, >+ ADD PRIMARY KEY (search_marc_map_id,search_field_id,filter) >+ } >+ ); >+ say $out "Updated primary key to include filter"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 21f6ec015c..4649cfa9bb 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5241,6 +5241,7 @@ DROP TABLE IF EXISTS `search_marc_to_field`; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `search_marc_to_field` ( > `search` tinyint(1) NOT NULL DEFAULT 1, >+ `filter` varchar(100) NOT NULL DEFAULT '' COMMENT 'specify a filter to be applied to field', > `search_marc_map_id` int(11) NOT NULL, > `search_field_id` int(11) NOT NULL, > `facet` tinyint(1) DEFAULT 0 COMMENT 'true if a facet field should be generated for this', >-- >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 27153
:
114234
|
139969
|
155145
|
155146
|
155147
|
155148
|
155149
|
155230
|
155502
|
155508
|
155509
|
155510
|
155511
|
155512
|
155513
|
155514
|
155515
|
155516
|
155517
|
157732
|
157733
|
157734
|
157735
|
157736
|
157737