Bugzilla – Attachment 85124 Details for
Bug 19575
Use canonical field names and resolve aliased fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19575: Keep authority-number as alias and fix query
Bug-19575-Keep-authority-number-as-alias-and-fix-q.patch (text/plain), 3.05 KB, created by
David Gustafsson
on 2019-02-14 15:55:16 UTC
(
hide
)
Description:
Bug 19575: Keep authority-number as alias and fix query
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2019-02-14 15:55:16 UTC
Size:
3.05 KB
patch
obsolete
>From 2f05628328c3d8a2c5c21d4bdca9910f1f160c27 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Thu, 14 Feb 2019 16:52:04 +0100 >Subject: [PATCH] Bug 19575: Keep authority-number as alias and fix query > >Keep authority-number as alias and change field name >from alias to real field in hard coded Elasticsearch query >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 1 + > Koha/SearchEngine/Elasticsearch/Search.pm | 2 +- > .../bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql | 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 7feb6e25c6..c65a4b56dd 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -557,6 +557,7 @@ our %index_field_convert = ( > 'se' => 'title-series', > 'ut' => 'title-uniform', > 'an' => 'koha-auth-number', >+ 'authority-number' => 'koha-auth-number', > 'at' => 'authtype', > 'he' => 'heading', > 'rank' => 'relevance', >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index ea166b597e..3436174250 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -266,7 +266,7 @@ sub count_auth_use { > query => { > bool => { > # query => { match_all => {} }, >- filter => { term => { 'authority-number' => $authid } } >+ filter => { term => { 'koha-auth-number' => $authid } } > } > } > }; >diff --git a/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql b/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql >index 3c825d64e6..6285c868a6 100644 >--- a/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql >+++ b/installer/data/mysql/atomicupdate/bug_19575-use-canonical-field-names-and-resolve-aliased-fields.sql >@@ -7,7 +7,7 @@ UPDATE `search_field` SET `name` = 'control-number', `label` = 'control-number' > UPDATE `search_field` SET `name` = 'place-of-publication', `label` = 'place-of-publication' WHERE `name` = 'place'; > UPDATE `search_field` SET `name` = 'date-of-acquisition', `label` = 'date-of-acquisition' WHERE `name` = 'acqdate'; > UPDATE `search_field` SET `name` = 'isbn', `label` = 'isbn' WHERE `name` = 'isbn'; >-UPDATE `search_field` SET `name` = 'authority-number', `label` = 'authority-number' WHERE `name` = 'an'; >+UPDATE `search_field` SET `name` = 'koha-auth-number', `label` = 'koha-auth-number' WHERE `name` = 'an'; > UPDATE `search_field` SET `name` = 'subject', `label` = 'subject' WHERE `name` = 'subject'; > UPDATE `search_field` SET `name` = 'publisher', `label` = 'publisher' WHERE `name` = 'publisher'; > UPDATE `search_field` SET `name` = 'record-source', `label` = 'record-source' WHERE `name` = 'record-source'; >-- >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 19575
:
68914
|
69140
|
69153
|
69306
|
69314
|
69479
|
69480
|
69507
|
70494
|
70495
|
70558
|
71090
|
71112
|
71966
|
72673
|
75115
|
81297
|
81299
|
81303
|
81304
|
82794
|
83704
|
83710
|
85029
|
85030
|
85062
|
85105
|
85124
|
85125
|
85126
|
85127
|
85128
|
85178
|
85247