Bug 25616: Uppercase hard coded lower case boolean operators for Elasticsearch
authorDavid Gustafsson <glasklas@gmail.com>
Thu, 28 May 2020 12:30:03 +0000 (14:30 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 25 Feb 2022 00:35:36 +0000 (14:35 -1000)
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Biblio.pm
C4/Heading.pm
C4/Search.pm
Koha/Biblio.pm
cataloguing/value_builder/marc21_linking_section.pl
cataloguing/value_builder/unimarc_field_4XX.pl
misc/migration_tools/bulkmarcimport.pl
serials/subscription-bib-search.pl

index ce2b949..48cdf47 100644 (file)
@@ -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) {
index 67ddcfd..4d67cd5 100644 (file)
@@ -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'};
index 18a2977..6cf40b6 100644 (file)
@@ -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
index a259db4..c4874a8 100644 (file)
@@ -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;
index 448dd4e..8206e70 100755 (executable)
@@ -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 } );
index 565290c..21f284d 100755 (executable)
@@ -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 );
index 63409e7..d2dfe1a 100755 (executable)
@@ -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 {
index d38147d..8791f03 100755 (executable)
@@ -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');