Bugzilla – Attachment 105411 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), 5.23 KB, created by
David Gustafsson
on 2020-05-28 12:35:11 UTC
(
hide
)
Description:
Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2020-05-28 12:35:11 UTC
Size:
5.23 KB
patch
obsolete
>From e4635358bfe036594054804d236b4edd4d34cbf9 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 >--- > C4/Biblio.pm | 6 +++--- > C4/Heading.pm | 4 ++-- > 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 +- > 6 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 9eb3696a54..0e8a29562d 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -1603,7 +1603,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; >@@ -1702,7 +1702,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; >@@ -1840,7 +1840,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 c58b507fef..db62c671db 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/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index ccadc9cac6..cb58d946c8 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -172,7 +172,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 259a903817..ecb88f9780 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -359,7 +359,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 6ab4b3fcf4..921566dff5 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -600,7 +600,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 { >@@ -616,7 +616,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 743fe512f6..5821a0657b 100755 >--- a/serials/subscription-bib-search.pl >+++ b/serials/subscription-bib-search.pl >@@ -92,7 +92,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; > $debug && warn $query; >-- >2.20.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