Index: openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl,v diff -u -N -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 2 Oct 2013 12:42:56 -0000 1.29.2.2 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 3 Aug 2014 10:57:10 -0000 1.29.2.3 @@ -252,19 +252,22 @@ regsub -all {[^-/@.\d\w\s\(\)]+} $query { } query # match parens, if they don't match just throw them away - set p 0 - for {set i 0} {$i < [string length $query]} {incr i} { - if {[string index $query $i] eq "("} { - incr p - } - if {[string index $query $i] eq ")"} { - incr p -1 - } - } - if {$p != 0} { - regsub -all {\(|\)} $query {} query - } + # set p 0 + # for {set i 0} {$i < [string length $query]} {incr i} { + # if {[string index $query $i] eq "("} { + # incr p + # } + # if {[string index $query $i] eq ")"} { + # incr p -1 + # } + # } + # if {$p != 0} { + # regsub -all {\(|\)} $query {} query + # } + # remove all parens + regsub -all {\(|\)} $query {} query + # remove empty () regsub -all {\(\s*\)} $query {} query