Bugzilla – Attachment 130029 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: Uppercase hard coded lower case boolean operators for Elasticsearch
Bug-25616-Uppercase-hard-coded-lower-case-boolean-.patch (text/plain), 6.12 KB, created by
Fridolin Somers
on 2022-02-01 00:15:48 UTC
(
hide
)
Description:
Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-02-01 00:15:48 UTC
Size:
6.12 KB
patch
obsolete
>From 4375820e07ddd3685bf2e5cae1f08ec42dbde2cf 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: 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> >--- > C4/Biblio.pm | 4 ++-- > C4/Heading.pm | 4 ++-- > C4/Search.pm | 2 +- > Koha/Biblio.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 +- > 8 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index ce2b949554..48cdf473ec 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -1633,7 +1633,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; >@@ -1771,7 +1771,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/Koha/Biblio.pm b/Koha/Biblio.pm >index a259db4bb7..c4874a859a 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -1038,7 +1038,7 @@ sub get_marc_authors { > 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; >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 63409e7964..d2dfe1ad56 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -592,7 +592,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 { >@@ -608,7 +608,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.34.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 25616
:
105411
|
130029
|
130588
|
130589
|
130914
|
130915
|
130916
|
131019
|
131020
|
131021
|
131022
|
131161
|
131162
|
131163
|
131164
|
131292
|
131293