From 527cf543af43d7b4817b94c9868bb45aea0e634f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Rodr=C3=ADguez?= Date: Fri, 26 May 2023 09:50:53 +0200 Subject: [PATCH 1/1] Fix - Bug 33842 - Search for authid not returning right results with QueryAutoTruncate ON --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index e57d1d7b60..580c103d20 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -1209,7 +1209,7 @@ sub _truncate_terms { # Append '*' to words if needed, ie. if it ends in a word character and is not a keyword my @terms = map { my $w = $_; - (/\W$/ or grep {lc($w) eq $_} qw/and or not/) ? $_ : "$_*"; + (/\W$/ or $w =~ /^(koha-auth-number).*$/ or grep {lc($w) eq $_} qw/and or not/) ? $_ : "$_*"; } @words; return join ' ', @terms; -- 2.30.2