@@ -, +, @@ --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -801,14 +801,7 @@ sub _truncate_terms { my @tokens = split /((?:[\w-]+:)?"[^"]+"|\s+)/, $query; # Filter out empty tokens - my @words = grep { $_ !~ /^\s*$/ } @tokens; - - # Append '*' to words if needed, ie. if it's not surrounded by quotes, not - # terminated by '*' and not a keyword - my @terms = map { - my $w = $_; - (/"$/ or /\*$/ or grep {lc($w) eq $_} qw/and or not/) ? $_ : "$_*"; - } @words; + my @terms = grep { $_ !~ /^\s*$/ } @tokens; return join ' ', @terms; } --