Bugzilla – Attachment 171601 Details for
Bug 33348
Show authority heading use with Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33348: Show authority heading use with Elasticsearch
Bug-33348-Show-authority-heading-use-with-Elastics.patch (text/plain), 1.90 KB, created by
Janusz Kaczmarek
on 2024-09-17 09:04:05 UTC
(
hide
)
Description:
Bug 33348: Show authority heading use with Elasticsearch
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2024-09-17 09:04:05 UTC
Size:
1.90 KB
patch
obsolete
>From 846a3fc7c7e875c6f986bddd2149c2883b5e1ae4 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 28 Mar 2023 02:10:59 +0000 >Subject: [PATCH] Bug 33348: Show authority heading use with Elasticsearch > >This patch ensures the ShowHeadingUse system preference and feature works as expected when using Elasticsearch as the searchengine. > >To test, follow the test plan at Bug 29990 Comment 9. Ensure the SearchEngine system preference is set to Elasticsearch. > >Sponsored-by: Education Services Australia SCIS >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index 42326e3573..df46134bb7 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -248,6 +248,18 @@ sub search_auth_compat { > $result{authtype} = $authtype ? $authtype->authtypetext : $authtypecode; > $result{reported_tag} = $reported_tag; > >+ if ( C4::Context->preference('ShowHeadingUse') ) { >+ # checking valid heading use >+ my $f008 = $marc->field('008'); >+ my $pos14to16 = substr( $f008->data, 14, 3 ); >+ my $main = substr( $pos14to16, 0, 1 ); >+ $result{main} = 1 if $main eq 'a'; >+ my $subject = substr( $pos14to16, 1, 1); >+ $result{subject} = 1 if $subject eq 'a'; >+ my $series = substr( $pos14to16, 2, 1 ); >+ $result{series} = 1 if $series eq 'a'; >+ } >+ > # Reimplementing BuildSummary is out of scope because it'll be hard > $result{summary} = > C4::AuthoritiesMarc::BuildSummary( $marc, $result{authid}, >-- >2.39.5
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 33348
:
148791
|
150440
|
150479
|
150481
|
150482
|
152570
|
152571
|
159066
|
171601
|
171602
|
171603
|
171686
|
171687
|
171688
|
171875
|
171876
|
173987
|
173988
|
173989