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.29.2.3 -r1.29.2.4 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 3 Aug 2014 10:57:10 -0000 1.29.2.3 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 21 Aug 2014 11:12:40 -0000 1.29.2.4 @@ -271,8 +271,12 @@ # remove empty () regsub -all {\(\s*\)} $query {} query - # remove or at beginning of query + # remove "or" at beginning of query regsub -nocase "^or " $query {} query + + # remove "not" at end of query + regsub -nocase " not$" $query {} query + # replace boolean words with boolean operators regsub -nocase "^not " $query {!} query set query [string map {" and " " & " " or " " | " " not " " ! "} " $query "]