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 -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 3 Jan 2006 14:49:55 -0000 1.16.2.1 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 13 Nov 2006 01:05:08 -0000 1.16.2.2 @@ -238,6 +238,8 @@ regsub -all {\(|\)} $query {} query } + # remove or at beginning of query + regsub -nocase "^or " $query {} query # replace boolean words with boolean operators regsub -nocase "^not " $query {!} query set query [string map {" and " " & " " or " " | " " not " " ! "} " $query "] @@ -256,6 +258,7 @@ # or if there is )\w or \w( insert an & between them regsub {(\))([\(\w])} $query {\1\ & \2} query regsub {([\)\w])(\()} $query {\1\ & \2} query + return $query }