[Koha-patches] [PATCH] Bug 11158 In searching starts with needs to apply to heading

Colin Campbell colin.campbell at ptfs-europe.com
Tue Oct 29 14:02:30 CET 2013


starts with was being applied to all tokens within the heading
needs to apply to the heading as a whole otherwise results
are indistinguishable to contains. The problem manifests if ICU
is being used for tokenization (although there are a couple of
anomalous cases that have cropped up using the old chr mappings)
---
 C4/AuthoritiesMarc.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 7443f36..2ece257 100644
--- a/C4/AuthoritiesMarc.pm
+++ b/C4/AuthoritiesMarc.pm
@@ -172,8 +172,8 @@ sub SearchAuthorities {
                 $attr .= " \@attr 4=107 ";    #Number Exact match
             }
             elsif ( @$operator[$i] eq "start" ) {
-                $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 "
-                  ;    #Firstinfield Phrase, Right truncated
+                $attr .= ' \@attr 3=1 \@attr 6=3 \@attr 4=1 \@attr 5=1 ';
+                # First_in_field, complete_field phrase Right truncation
             }
             elsif ( @$operator[$i] eq "exact" ) {
                 $attr .= " \@attr 4=1  \@attr 5=100 \@attr 6=3 "
-- 
1.8.3.1



More information about the Koha-patches mailing list