From f3ba63bad6c8d8e9ab35ba0ae5edb2a68245f139 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 1 Sep 2020 03:37:22 +0000 Subject: [PATCH] Bug 15851: (QA follow-up) Fix booleans to uppercase to make this work for Elasticsearch and UseControlNumber Same test plan as before, but with UseControlNumber = Use and Elasticsearch. --- catalogue/detail.pl | 2 +- opac/opac-detail.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index baab67bf62..ffdf850e68 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -153,7 +153,7 @@ if ( $xslfile ) { $cleaned_title =~ tr|/||; my $query = ( C4::Context->preference('UseControlNumber') and $record->field('001') ) - ? 'rcn:'. $record->field('001')->data . ' and (bib-level:a or bib-level:b)' + ? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' : "Host-item:$cleaned_title"; my ( $err, $result, $count ) = $searcher->simple_search_compat( $query, 0, 0 ); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 4e789cb8b5..8d4723e338 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -189,7 +189,7 @@ if ( $xslfile ) { $cleaned_title =~ tr|/||; my $query = ( C4::Context->preference('UseControlNumber') and $record->field('001') ) - ? 'rcn:'. $record->field('001')->data . ' and (bib-level:a or bib-level:b)' + ? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' : "Host-item:$cleaned_title"; my ( $err, $result, $count ) = $searcher->simple_search_compat( $query, 0, 0 ); -- 2.11.0