Bugzilla – Attachment 131161 Details for
Bug 25616
Uppercase hard coded lower case boolean operators for Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25616: [21.11.x] Uppercase hard coded lower case boolean operators for Elasticsearch
Bug-25616-2111x-Uppercase-hard-coded-lower-case-bo.patch (text/plain), 6.07 KB, created by
Fridolin Somers
on 2022-02-28 06:06:28 UTC
(
hide
)
Description:
Bug 25616: [21.11.x] Uppercase hard coded lower case boolean operators for Elasticsearch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-02-28 06:06:28 UTC
Size:
6.07 KB
patch
obsolete
>From 335f4ba7a948c4ba08ead08dc7850bc6e615ef2a Mon Sep 17 00:00:00 2001 >From: David Gustafsson <glasklas@gmail.com> >Date: Thu, 28 May 2020 14:30:03 +0200 >Subject: [PATCH] Bug 25616: [21.11.x] Uppercase hard coded lower case boolean > operators for Elasticsearch > >Uppercase occurances of all (hopefully) lowercase "and" >used in ElasticSearch Query String Query contexts > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Biblio.pm | 6 +++--- > C4/Heading.pm | 4 ++-- > C4/Search.pm | 2 +- > cataloguing/value_builder/marc21_linking_section.pl | 2 +- > cataloguing/value_builder/unimarc_field_4XX.pl | 2 +- > misc/migration_tools/bulkmarcimport.pl | 4 ++-- > serials/subscription-bib-search.pl | 2 +- > 7 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 69e488a1a1..b5c870d635 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -1634,7 +1634,7 @@ sub GetMarcSubjects { > push @link_loop, { > limit => $subject_limit, > 'link' => $linkvalue, >- operator => (scalar @link_loop) ? ' and ' : undef >+ operator => (scalar @link_loop) ? ' AND ' : undef > }; > } > my @this_link_loop = @link_loop; >@@ -1733,7 +1733,7 @@ sub GetMarcAuthors { > push @link_loop, { > limit => 'au', > 'link' => $linkvalue, >- operator => (scalar @link_loop) ? ' and ' : undef >+ operator => (scalar @link_loop) ? ' AND ' : undef > }; > } > my @this_link_loop = @link_loop; >@@ -1871,7 +1871,7 @@ sub GetMarcSeries { > > push @link_loop, { > 'link' => $linkvalue, >- operator => (scalar @link_loop) ? ' and ' : undef >+ operator => (scalar @link_loop) ? ' AND ' : undef > }; > > if ($volume_number) { >diff --git a/C4/Heading.pm b/C4/Heading.pm >index 67ddcfd46a..4d67cd5624 100644 >--- a/C4/Heading.pm >+++ b/C4/Heading.pm >@@ -202,14 +202,14 @@ sub _search { > > if ($index) { > push @marclist, $index; >- push @and_or, 'and'; >+ push @and_or, 'AND'; > push @operator, $self->{'match_type'}; > push @value, $self->{'search_form'}; > } > > # if ($self->{'thesaurus'}) { > # push @marclist, 'thesaurus'; >- # push @and_or, 'and'; >+ # push @and_or, 'AND'; > # push @excluding, ''; > # push @operator, 'is'; > # push @value, $self->{'thesaurus'}; >diff --git a/C4/Search.pm b/C4/Search.pm >index 0bf8c6d209..bb14a7ecf0 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1585,7 +1585,7 @@ sub _build_initial_query { > my $operator = ""; > if ($params->{previous_operand}){ > #If there is a previous operand, add a supplied operator or the default 'and' >- $operator = ($params->{operator}) ? " ".($params->{operator})." " : ' and '; >+ $operator = ($params->{operator}) ? " ".($params->{operator})." " : ' AND '; > } > > #NOTE: indexes_set is typically set when doing truncation or field weighting >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 5bff56495d..d4553960a3 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -168,7 +168,7 @@ my $launcher = sub { > my $startfrom = $query->param('startfrom'); > my $resultsperpage = $query->param('resultsperpage') || 20; > my $orderby; >- my $op = 'and'; >+ my $op = 'AND'; > > my $searcher = Koha::SearchEngine::Search->new( > { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index 83dcaf3c8c..105c394697 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -337,7 +337,7 @@ sub plugin { > my $startfrom = $query->param('startfrom'); > my $resultsperpage = $query->param('resultsperpage') || 20; > my $orderby; >- my $op = 'and'; >+ my $op = 'AND'; > $search = 'kw:'.$search." $op mc-itemtype:".$itype if $itype; > my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); > my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($search, $startfrom * $resultsperpage, $resultsperpage ); >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 5cb9b7b63b..2a2dff7557 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -597,7 +597,7 @@ sub build_query { > my $string = build_simplequery($matchingpoint,$record); > push @searchstrings,$string if (length($string)>0); > } >- my $op = 'and'; >+ my $op = 'AND'; > return join(" $op ",@searchstrings); > } > sub build_simplequery { >@@ -613,7 +613,7 @@ sub build_simplequery { > } > } > } >- my $op = 'and'; >+ my $op = 'AND'; > return join(" $op ",@searchstrings); > } > sub report_item_errors { >diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl >index d38147d8c1..8791f037da 100755 >--- a/serials/subscription-bib-search.pl >+++ b/serials/subscription-bib-search.pl >@@ -89,7 +89,7 @@ if ( $op eq "do_search" && $query ) { > # add the limits if applicable > my $itemtypelimit = $input->param('itemtypelimit'); > my $ccodelimit = $input->param('ccodelimit'); >- my $op = 'and'; >+ my $op = 'AND'; > $query .= " $op $itype_or_itemtype:$itemtypelimit" if $itemtypelimit; > $query .= " $op ccode:$ccodelimit" if $ccodelimit; > $resultsperpage = $input->param('resultsperpage'); >-- >2.35.1
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 25616
:
105411
|
130029
|
130588
|
130589
|
130914
|
130915
|
130916
|
131019
|
131020
|
131021
|
131022
| 131161 |
131162
|
131163
|
131164
|
131292
|
131293