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>
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>
This commit is contained in:
David Gustafsson 2020-05-28 14:30:03 +02:00 committed by Fridolin Somers
parent 116d231ec9
commit 7da4912f8e
8 changed files with 11 additions and 11 deletions

View 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) {

View 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'};

View 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

View 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;

View File

@ -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 } );

View File

@ -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 );

View File

@ -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 {

View File

@ -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');