From 5388011da03f4754f8c18257ce004fa2969017e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Mon, 2 Nov 2020 16:46:16 +0200 Subject: [PATCH] Bug 11175: (follow-up) Use uppercase AND and OR words in search query Elasticsearch only understands uppercase query operators. --- Koha/Biblio.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 8d21fd26d0..113724e4d9 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -523,8 +523,8 @@ sub components { $searchstr = "rcn='".$pf001->data()."'"; } else { # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001') - $searchstr = "(rcn='".$pf001->data()."' and cni='".$pf003->data()."')"; - $searchstr .= " or rcn='".$pf003->data()." ".$pf001->data()."'"; + $searchstr = "(rcn='".$pf001->data()."' AND cni='".$pf003->data()."')"; + $searchstr .= " OR rcn='".$pf003->data()." ".$pf001->data()."'"; } my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef ); -- 2.11.0