Bug 6786: Follow up fixing index names with hyphens
[koha.git] / C4 / Search.pm
index 98db887..fdb3479 100644 (file)
@@ -1075,7 +1075,7 @@ sub buildQuery {
     my $cclq       = 0;
     my $cclindexes = getIndexes();
     if ( $query !~ /\s*ccl=/ ) {
-        while ( !$cclq && $query =~ /(?:^|\W)(\w+)(,\w+)*[:=]/g ) {
+        while ( !$cclq && $query =~ /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g ) {
             my $dx = lc($1);
             $cclq = grep { lc($_) eq $dx } @$cclindexes;
         }