|
Lines 658-664
sub get_matches {
Link Here
|
| 658 |
else { |
658 |
else { |
| 659 |
my $phr = C4::Context->preference('AggressiveMatchOnISBN') ? ',phr' : q{}; |
659 |
my $phr = C4::Context->preference('AggressiveMatchOnISBN') ? ',phr' : q{}; |
| 660 |
$query = join( " or ", |
660 |
$query = join( " or ", |
| 661 |
map { "$matchpoint->{'index'}$phr=$_" } @source_keys ); |
661 |
map { "$matchpoint->{'index'}$phr=\"$_\"" } @source_keys ); |
|
|
662 |
#NOTE: double-quote the values so you don't get a "Embedded truncation not supported" error when a term has a ? in it. |
| 662 |
} |
663 |
} |
| 663 |
|
664 |
|
| 664 |
require C4::Search; |
665 |
require C4::Search; |
|
Lines 813-819
sub _get_match_keys {
Link Here
|
| 813 |
} else { |
814 |
} else { |
| 814 |
foreach my $subfield ($field->subfields()) { |
815 |
foreach my $subfield ($field->subfields()) { |
| 815 |
if (exists $component->{'subfields'}->{$subfield->[0]}) { |
816 |
if (exists $component->{'subfields'}->{$subfield->[0]}) { |
| 816 |
$string .= " " . $subfield->[1]; |
817 |
$string .= " " . $subfield->[1]; #FIXME: It would be better to create an array and join with a space later... |
| 817 |
} |
818 |
} |
| 818 |
} |
819 |
} |
| 819 |
} |
820 |
} |
|
Lines 824-829
sub _get_match_keys {
Link Here
|
| 824 |
$string= substr($string, $component->{'offset'}); |
825 |
$string= substr($string, $component->{'offset'}); |
| 825 |
} |
826 |
} |
| 826 |
$key = $string; |
827 |
$key = $string; |
|
|
828 |
$key =~ s/^\s+|\s+$//g; #Trim whitespace off the front and back of the key. |
| 827 |
my $norms = $component->{'norms'}; |
829 |
my $norms = $component->{'norms'}; |
| 828 |
my $normalizer = $norms->[0]; #Matching rules, currently, can only have one normalizer. It will always be defined, even if it's only as ''. |
830 |
my $normalizer = $norms->[0]; #Matching rules, currently, can only have one normalizer. It will always be defined, even if it's only as ''. |
| 829 |
if ($normalizer !~ /(none|raw)/i){ |
831 |
if ($normalizer !~ /(none|raw)/i){ |
| 830 |
- |
|
|