Lines 903-918
sub buildQuery {
Link Here
|
903 |
# Some helpful index variants |
903 |
# Some helpful index variants |
904 |
my $index_plus = $index . $struct_attr . ":" if $index; |
904 |
my $index_plus = $index . $struct_attr . ":" if $index; |
905 |
my $index_plus_comma = $index . $struct_attr . "," if $index; |
905 |
my $index_plus_comma = $index . $struct_attr . "," if $index; |
906 |
if ($auto_truncation){ |
|
|
907 |
# FIXME Auto Truncation is only valid for LTR languages |
908 |
# use C4::Output; |
909 |
# use C4::Languages qw(regex_lang_subtags get_bidi); |
910 |
# $lang = $query->cookie('KohaOpacLanguage') if (defined $query && $query->cookie('KohaOpacLanguage')); |
911 |
# my $current_lang = regex_lang_subtags($lang); |
912 |
# my $bidi; |
913 |
# $bidi = get_bidi($current_lang->{script}) if $current_lang->{script}; |
914 |
$index_plus_comma .= "rtrn:"; |
915 |
} |
916 |
|
906 |
|
917 |
# Remove Stopwords |
907 |
# Remove Stopwords |
918 |
if ($remove_stopwords) { |
908 |
if ($remove_stopwords) { |
Lines 923-928
sub buildQuery {
Link Here
|
923 |
if ( $stopwords_removed && $DEBUG ); |
913 |
if ( $stopwords_removed && $DEBUG ); |
924 |
} |
914 |
} |
925 |
|
915 |
|
|
|
916 |
if ($auto_truncation){ |
917 |
#FIXME only valid with LTR scripts |
918 |
$operand=join(" ",map{ |
919 |
"$_*" |
920 |
}split (/\s+/,$operand)); |
921 |
warn $operand if $DEBUG; |
922 |
} |
923 |
|
926 |
# Detect Truncation |
924 |
# Detect Truncation |
927 |
my $truncated_operand; |
925 |
my $truncated_operand; |
928 |
my( $nontruncated, $righttruncated, $lefttruncated, |
926 |
my( $nontruncated, $righttruncated, $lefttruncated, |
929 |
- |
|
|