Lines 645-651
sub get_matches {
Link Here
|
645 |
my $total_hits; |
645 |
my $total_hits; |
646 |
if ( $self->{'record_type'} eq 'biblio' ) { |
646 |
if ( $self->{'record_type'} eq 'biblio' ) { |
647 |
|
647 |
|
648 |
if ($QParser) { |
648 |
#NOTE: The QueryParser can't handle the CCL syntax of 'qualifier','qualifier', so fallback to non-QueryParser. |
|
|
649 |
#NOTE: You can see this in C4::Search::SimpleSearch() as well in a different way. |
650 |
if ($QParser && $matchpoint->{'index'} !~ m/\w,\w/) { |
649 |
$query = join( " || ", |
651 |
$query = join( " || ", |
650 |
map { "$matchpoint->{'index'}:$_" } @source_keys ); |
652 |
map { "$matchpoint->{'index'}:$_" } @source_keys ); |
651 |
} |
653 |
} |
Lines 658-664
sub get_matches {
Link Here
|
658 |
|
660 |
|
659 |
my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
661 |
my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
660 |
( $error, $searchresults, $total_hits ) = |
662 |
( $error, $searchresults, $total_hits ) = |
661 |
$searcher->simple_search_compat( $query, 0, $max_matches ); |
663 |
$searcher->simple_search_compat( $query, 0, $max_matches, undef, "skip_normalize" ); |
662 |
} |
664 |
} |
663 |
elsif ( $self->{'record_type'} eq 'authority' ) { |
665 |
elsif ( $self->{'record_type'} eq 'authority' ) { |
664 |
my $authresults; |
666 |
my $authresults; |
Lines 818-824
sub _get_match_keys {
Link Here
|
818 |
} elsif ($component->{'offset'}) { |
820 |
} elsif ($component->{'offset'}) { |
819 |
$string= substr($string, $component->{'offset'}); |
821 |
$string= substr($string, $component->{'offset'}); |
820 |
} |
822 |
} |
821 |
$key = _normalize($string); |
823 |
$key = $string; |
|
|
824 |
my $norms = $component->{'norms'}; |
825 |
my $normalizer = $norms->[0]; #Matching rules, currently, can only have one normalizer. It will always be defined, even if it's only as ''. |
826 |
if ($normalizer !~ /(none|raw)/i){ |
827 |
$key = _normalize($string); |
828 |
} |
822 |
if ($i == 0) { |
829 |
if ($i == 0) { |
823 |
push @keys, $key if $key; |
830 |
push @keys, $key if $key; |
824 |
} else { |
831 |
} else { |