From 4f29dcb57a3ba3674549b6f499150c53823cdb58 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Tue, 30 Oct 2007 19:18:07 -0500 Subject: [PATCH] fixing fielded truncation Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 5069f3861b..d611e152da 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -580,7 +580,7 @@ sub _add_truncation { # if the index contains more than one qualifier, but not phrase, add truncation qualifiers #if (index($index,"phr")<0 && index($index,",")>0){ # warn "ADDING TRUNCATION QUALIFIERS"; - $operand =~ s/ //g; + $operand =~ s/^ //g; my @wordlist= split (/\s/,$operand); foreach my $word (@wordlist){ #warn "WORD: $word"; @@ -755,7 +755,7 @@ sub buildQuery { my $index = $indexes[$i]; # if there's no index, don't use one, it will throw a CCL error my $index_plus; $index_plus = "$index:" if $index; - my $index_plus_comma; $index_plus_comma="$index_plus," if $index; + my $index_plus_comma; $index_plus_comma="$index," if $index; # Remove Stopwords $operand = _remove_stopwords($operand,$index); @@ -809,7 +809,7 @@ sub buildQuery { $human_search_desc .= $query; } else { $query .= " $index_plus $operand"; - $human_search_desc .= " $index_plus $operands[$i]"; + $human_search_desc .= " $index_plus $operands[$i]"; } $previous_operand = 1; } -- 2.39.5