Bugzilla – Attachment 148500 Details for
Bug 33277
Correctly handle linking subfields with no defined thesaurus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33277: (follow-up) Fix notdefined search for Zebra and ES
Bug-33277-follow-up-Fix-notdefined-search-for-Zebr.patch (text/plain), 2.13 KB, created by
Nick Clemens (kidclamp)
on 2023-03-22 00:33:53 UTC
(
hide
)
Description:
Bug 33277: (follow-up) Fix notdefined search for Zebra and ES
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-22 00:33:53 UTC
Size:
2.13 KB
patch
obsolete
>From e4f760cf8d7aa180d6e8883f49004a3cc04ced53 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 22 Mar 2023 00:33:23 +0000 >Subject: [PATCH] Bug 33277: (follow-up) Fix notdefined search for Zebra and ES > >--- > C4/Heading.pm | 2 +- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 3 ++- > t/db_dependent/Heading.t | 2 +- > 3 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Heading.pm b/C4/Heading.pm >index 0e45a66624..3c68c47a3a 100644 >--- a/C4/Heading.pm >+++ b/C4/Heading.pm >@@ -244,7 +244,7 @@ sub _search { > # This is legal, so we do a fallback search > if( !$total && $thesaurus && !( grep /$thesaurus/,('lcsh','lcac','mesh','nal','notspecified','cash','rvm','sears','aat') ) ){ > pop @value; >- push @value, 'z'; >+ push @value, 'notdefined'; > $search_query = $builder->build_authorities_query_compat( > \@marclist, \@and_or, \@excluding, \@operator, > \@value, $self->{'auth_type'}, >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 5f4f7398e2..6886c937f9 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -577,7 +577,8 @@ our $thesaurus_to_value = { > cash => 'k', > rvm => 'v', > aat => 'r', >- sears => 's' >+ sears => 's', >+ notdefined => 'z' > }; > > sub build_authorities_query_compat { >diff --git a/t/db_dependent/Heading.t b/t/db_dependent/Heading.t >index aa39c4f767..31a7311f85 100755 >--- a/t/db_dependent/Heading.t >+++ b/t/db_dependent/Heading.t >@@ -165,6 +165,6 @@ subtest "_search tests" => sub { > { term => { 'match-heading.ci_raw' => 'Uncles generalsubdiv Fiction' } }, > { term => { 'subject-heading-thesaurus.ci_raw' => 'z' } }, > ]; >- is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for 008_11 = z"); >+ is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for notdefined (008_11 = z) "); > > }; >-- >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 33277
:
148417
|
148418
|
148419
|
148492
|
148493
|
148494
|
148495
|
148500
|
148527
|
148528
|
148529
|
148530
|
148531
|
148734
|
148735
|
148957
|
149837
|
149838
|
149839
|
149840
|
149841
|
149842
|
150890
|
150891
|
150977
|
150978
|
150979
|
150980
|
150981
|
150982
|
150983