@@ -, +, @@ 1 - Setup Koha using Zebra and icuchains 2 - Add ccode to AdvancedSearchTypes 3 - In koha-conf.xml set zebra debug level to include request none,fatal,warn,request,info 4 - Set some items into different ccodes 5 - On opac perform a search for: ccode:NFIC 6 - It works 7 - tail -n 50 /var/log/koha/kohadev/zebra-output.log 8 - Note search request like: Search biblios OK 26 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC 9 - On opac go to advanced search, select Collection, and limit to smae code a s above Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 'NFIC' Search biblios OK 0 1 1+0 RPN @attrset Bib-1 @attr 1=8009 NFIC --- C4/Search.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -1264,7 +1264,6 @@ See verbose embedded documentation. sub buildQuery { my ( $operators, $operands, $indexes, $limits, $sort_by, $scan, $lang) = @_; - warn "---------\nEnter buildQuery\n---------" if $DEBUG; my $query_desc; @@ -1534,7 +1533,7 @@ sub buildQuery { if ( $k !~ /mc-i(tem)?type/ ) { # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes $this_limit =~ tr/"//d; - $this_limit = $k.":'".$v."'"; + $this_limit = $k.':"'.$v.'"'; } $group_OR_limits{$k} .= " or " if $group_OR_limits{$k}; --