@@ -, +, @@ --- C4/AuthoritiesMarc.pm | 2 +- C4/Biblio.pm | 2 +- Koha/QueryParser/Driver/PQF/query_plan/node.pm | 2 +- OpenILS/QueryParser.pm | 2 +- etc/searchengine/queryparser.yaml | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) --- a/C4/AuthoritiesMarc.pm +++ a/C4/AuthoritiesMarc.pm @@ -283,7 +283,7 @@ sub SearchAuthorities { $dosearch=1; ++$attr_cnt; if ($QParser) { - $qpquery .= " $tags->[$i]:$value->[$i]"; + $qpquery .= " $tags->[$i]:\"$value->[$i]\""; } }#if value } --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -667,7 +667,7 @@ sub _check_valid_auth_link { require C4::AuthoritiesMarc; my $authorized_heading = - C4::AuthoritiesMarc::GetAuthorizedHeading( { 'authid' => $authid } ); + C4::AuthoritiesMarc::GetAuthorizedHeading( { 'authid' => $authid } ) || ''; return ($field->as_string('abcdefghijklmnopqrstuvwxyz') eq $authorized_heading); } --- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm +++ a/Koha/QueryParser/Driver/PQF/query_plan/node.pm @@ -34,7 +34,7 @@ sub target_syntax { if ($relbump) { $fieldobj->{'attr_string'} .= ' ' . $relbump->{'attr_string'}; } - push @fields, $fieldobj unless (!defined($fieldobj) || ($field eq $self->classname && scalar @fields)); + push @fields, $fieldobj unless (!defined($fieldobj) || ($field eq $self->classname && @{$self->fields} > 1)); } } else { $fieldobj = $self->plan->QueryParser->bib1_mapping_by_name('field', $self->classname, $self->classname, $server); --- a/OpenILS/QueryParser.pm +++ a/OpenILS/QueryParser.pm @@ -1175,7 +1175,7 @@ sub decompose { # Cleanup the phrase to make it so that we don't parse things in it as anything other than atoms $phrase =~ s/$phrase_cleanup_re/ /g; - $_ = $phrase . $temp_val; + $_ = $temp_val; } --- a/etc/searchengine/queryparser.yaml +++ a/etc/searchengine/queryparser.yaml @@ -1133,6 +1133,9 @@ field_mappings: bib1_mapping: authorityserver: 1: Match-heading + 4: 1 + 5: 100 + 6: 3 enabled: 1 index: matchheading label: Matchheading --