From 376c55dc4ec13abb00e4527d5b4c3c513c8e9ff3 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Thu, 14 Mar 2013 10:11:16 -0400 Subject: [PATCH] Bug 9239 QA follow-up: remove stray debug code Remove a line of debug code from EG, provide better error handling when presented with weird data in the authority linker, and correct queryparser configuration to reflect the correct configuration for Zebra. Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- 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(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index e30c571b03..5d66e48d32 100644 --- a/C4/AuthoritiesMarc.pm +++ b/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 } diff --git a/C4/Biblio.pm b/C4/Biblio.pm index d232fa68ac..16134d4ca9 100644 --- a/C4/Biblio.pm +++ b/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); } diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node.pm b/Koha/QueryParser/Driver/PQF/query_plan/node.pm index 6e0a6058bb..3727e34910 100644 --- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm +++ b/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); diff --git a/OpenILS/QueryParser.pm b/OpenILS/QueryParser.pm index e5aaf091e9..f0051f76de 100644 --- a/OpenILS/QueryParser.pm +++ b/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; } diff --git a/etc/searchengine/queryparser.yaml b/etc/searchengine/queryparser.yaml index f54ac3b4ce..0cce85cc07 100644 --- a/etc/searchengine/queryparser.yaml +++ b/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 -- 2.20.1